repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/spec/dependabot/updater/operations/refresh_security_update_pull_request_spec.rb | updater/spec/dependabot/updater/operations/refresh_security_update_pull_request_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "support/dummy_pkg_helpers"
require "support/dependency_file_helpers"
require "dependabot/fetched_files"
require "dependabot/dependency_change"
require "dependabot/dependency_snapshot"
require "dependabot/service"
require "dependabot/updater/er... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/spec/dependabot/updater/operations/create_group_update_pull_request_spec.rb | updater/spec/dependabot/updater/operations/create_group_update_pull_request_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "support/dummy_pkg_helpers"
require "support/dependency_file_helpers"
require "dependabot/dependency_change"
require "dependabot/dependency_snapshot"
require "dependabot/service"
require "dependabot/updater/error_handler"
require "dependabot/u... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/spec/dependabot/updater/operations/update_all_versions_spec.rb | updater/spec/dependabot/updater/operations/update_all_versions_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "support/dummy_pkg_helpers"
require "support/dependency_file_helpers"
require "dependabot/dependency_change"
require "dependabot/dependency_snapshot"
require "dependabot/service"
require "dependabot/updater/error_handler"
require "dependabot/u... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/spec/dependabot/updater/operations/refresh_version_update_pull_request_spec.rb | updater/spec/dependabot/updater/operations/refresh_version_update_pull_request_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "support/dummy_pkg_helpers"
require "support/dependency_file_helpers"
require "dependabot/dependency_change"
require "dependabot/dependency_snapshot"
require "dependabot/service"
require "dependabot/updater/error_handler"
require "dependabot/u... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/spec/dependabot/updater/operations/create_security_update_pull_request_spec.rb | updater/spec/dependabot/updater/operations/create_security_update_pull_request_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "support/dummy_pkg_helpers"
require "support/dependency_file_helpers"
require "dependabot/dependency_change"
require "dependabot/dependency_snapshot"
require "dependabot/service"
require "dependabot/updater/error_handler"
require "dependabot/u... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/github_api/dependency_submission.rb | updater/lib/github_api/dependency_submission.rb | # typed: strong
# frozen_string_literal: true
require "dependabot/dependency_graphers"
require "dependabot/environment"
# This class provides a data object that can be submitted to a repository's dependency submission
# REST API.
#
# See:
# https://docs.github.com/en/rest/dependency-graph/dependency-submission
modu... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/dependency_snapshot.rb | updater/lib/dependabot/dependency_snapshot.rb | # typed: strict
# frozen_string_literal: true
require "base64"
require "sorbet-runtime"
require "dependabot/file_parsers"
require "dependabot/notices_helpers"
# This class describes the dependencies obtained from a project at a specific commit SHA
# including both the Dependabot::DependencyFile objects at that refer... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/dependency_change_builder.rb | updater/lib/dependabot/dependency_change_builder.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/dependency"
require "dependabot/dependency_change"
require "dependabot/file_updaters"
require "dependabot/dependency_group"
# This class is responsible for generating a DependencyChange for a given
# set of dependencies and dep... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/dependency_attribution.rb | updater/lib/dependabot/dependency_attribution.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/dependency"
# Extension to add attribution metadata to Dependency objects
# for group membership enforcement observability and debugging
module Dependabot
module DependencyAttribution
extend T::Sig
# Selection reason... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/setup.rb | updater/lib/dependabot/setup.rb | # typed: strict
# frozen_string_literal: true
require "sentry-ruby"
require "sorbet-runtime"
require "dependabot/environment"
require "dependabot/logger"
require "dependabot/logger/formats"
require "dependabot/opentelemetry"
require "dependabot/sentry"
require "dependabot/sorbet/runtime"
Dependabot.logger = Logger.n... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/environment.rb | updater/lib/dependabot/environment.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
module Dependabot
module Environment
extend T::Sig
extend T::Generic
sig { returns(String) }
def self.job_id
@job_id ||= T.let(environment_variable("DEPENDABOT_JOB_ID"), T.nilable(String))
end
sig { returns(String... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/pull_request.rb | updater/lib/dependabot/pull_request.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
module Dependabot
class PullRequest
extend T::Sig
class Dependency
extend T::Sig
sig { returns(String) }
attr_reader :name
sig { returns(T.nilable(String)) }
attr_reader :version
sig { returns(T::B... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/base_command.rb | updater/lib/dependabot/base_command.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/api_client"
require "dependabot/errors"
require "dependabot/service"
require "dependabot/logger"
require "dependabot/logger/formats"
require "dependabot/environment"
module Dependabot
class RunFailure < StandardError; end
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/update_files_command.rb | updater/lib/dependabot/update_files_command.rb | # typed: strict
# frozen_string_literal: true
require "base64"
require "json"
require "dependabot/base_command"
require "dependabot/fetched_files"
require "dependabot/dependency_snapshot"
require "dependabot/errors"
require "dependabot/opentelemetry"
require "dependabot/updater"
require "github_api/dependency_submiss... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater.rb | updater/lib/dependabot/updater.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
# Dependabot components
require "dependabot/dependency_change"
require "dependabot/dependency_change_builder"
require "dependabot/environment"
require "dependabot/experiments"
require "dependabot/file_fetchers"
require "dependabot/logger"
require ... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/update_graph_command.rb | updater/lib/dependabot/update_graph_command.rb | # typed: strict
# frozen_string_literal: true
require "json"
require "dependabot/base_command"
require "dependabot/fetched_files"
require "dependabot/dependency_snapshot"
require "dependabot/errors"
require "dependabot/opentelemetry"
require "dependabot/update_graph_processor"
require "github_api/dependency_submission... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/opentelemetry.rb | updater/lib/dependabot/opentelemetry.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "opentelemetry/sdk"
require "opentelemetry-logs-sdk"
require "opentelemetry-metrics-sdk"
module Dependabot
module OpenTelemetry
extend T::Sig
module Attributes
JOB_ID = "dependabot.job.id"
WARN_TYPE = "dependabot.job... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/notices_helpers.rb | updater/lib/dependabot/notices_helpers.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/notices"
require "dependabot/ecosystem"
require "debug"
# This module extracts helpers for notice generations that can be used
# for showing notices in logs, pr messages and alert ui page.
module Dependabot
module NoticesHelp... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/service.rb | updater/lib/dependabot/service.rb | # typed: strict
# frozen_string_literal: true
require "sentry-ruby"
require "sorbet-runtime"
require "terminal-table"
require "dependabot/api_client"
require "dependabot/errors"
require "dependabot/opentelemetry"
require "dependabot/experiments"
# This class provides an output adapter for the Dependabot Service whic... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/api_client.rb | updater/lib/dependabot/api_client.rb | # typed: strict
# frozen_string_literal: true
require "http"
require "dependabot/job"
require "dependabot/opentelemetry"
require "sorbet-runtime"
require "dependabot/errors"
# Provides a client to access the internal Dependabot Service's API
#
# The Service acts as a relay to Core's GitHub API adapters while providin... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/job.rb | updater/lib/dependabot/job.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "wildcard_matcher"
require "dependabot/config/ignore_condition"
require "dependabot/config/update_config"
require "dependabot/credential"
require "dependabot/dependency_group_engine"
require "dependabot/experiments"
require "dependabot/req... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/dependency_change.rb | updater/lib/dependabot/dependency_change.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/errors"
require "dependabot/pull_request_creator/message_builder"
# This class describes a change to the project's Dependencies which has been
# determined by a Dependabot operation.
#
# It includes a list of changed Dependabot... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/file_fetcher_command.rb | updater/lib/dependabot/file_fetcher_command.rb | # typed: strict
# frozen_string_literal: true
require "dependabot/base_command"
require "dependabot/fetched_files"
require "dependabot/errors"
require "dependabot/git_metadata_fetcher"
require "dependabot/opentelemetry"
require "dependabot/updater"
require "octokit"
require "sorbet-runtime"
module Dependabot
class ... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/update_graph_processor.rb | updater/lib/dependabot/update_graph_processor.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
# Dependabot components
require "dependabot/environment"
require "dependabot/experiments"
require "dependabot/dependency_graphers"
require "dependabot/logger"
# Updater components
require "dependabot/updater/error_handler"
require "github_api/dep... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/dependency_group_engine.rb | updater/lib/dependabot/dependency_group_engine.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/dependency_group"
require "dependabot/updater/pattern_specificity_calculator"
# This class implements our strategy for keeping track of and matching dependency
# groups that are defined by users in their dependabot config file... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/sentry.rb | updater/lib/dependabot/sentry.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/sentry/exception_sanitizer_processor"
require "dependabot/sentry/sentry_context_processor"
module Dependabot
module Sentry
extend T::Sig
# The default processor chain.
# This chain is applied in the order of the ... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/fetched_files.rb | updater/lib/dependabot/fetched_files.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
module Dependabot
class FetchedFiles
extend T::Sig
sig { returns(T::Array[Dependabot::DependencyFile]) }
attr_reader :dependency_files
sig { returns(String) }
attr_reader :base_commit_sha
sig { params(dependency_files:... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/sentry/processor.rb | updater/lib/dependabot/sentry/processor.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
module Dependabot
module Sentry
class Processor
extend T::Sig
extend T::Helpers
abstract!
# Process an event before it is sent to Sentry
sig do
abstract
.params(
event: ::Sentry::... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/sentry/exception_sanitizer_processor.rb | updater/lib/dependabot/sentry/exception_sanitizer_processor.rb | # typed: strong
# frozen_string_literal: true
require "sentry-ruby"
require "sorbet-runtime"
require "dependabot/sentry/processor"
# ExceptionSanitizer filters potential secrets/PII from exception payloads
class ExceptionSanitizer < ::Dependabot::Sentry::Processor
extend T::Sig
REPO = %r{[\w.\-]+/([\w.\-]+)}
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/sentry/sentry_context_processor.rb | updater/lib/dependabot/sentry/sentry_context_processor.rb | # typed: strict
# frozen_string_literal: true
require "sentry-ruby"
require "sorbet-runtime"
require "dependabot/sentry/processor"
class SentryContext < ::Dependabot::Sentry::Processor
sig do
override
.params(
event: ::Sentry::Event,
hint: T::Hash[Symbol, T.untyped]
)
.returns... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/logger/formats.rb | updater/lib/dependabot/logger/formats.rb | # typed: strong
# frozen_string_literal: true
require "logger"
# Provides Logger::Formatter classes specific to the Updater project to augment
# the global log helper defined in common/lib/dependabot/logger.rb
module Dependabot
module Logger
TIME_FORMAT = "%Y/%m/%d %H:%M:%S"
class BasicFormatter < ::Logger... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/sorbet/runtime.rb | updater/lib/dependabot/sorbet/runtime.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/api_client"
require "dependabot/service"
module Dependabot
module Sorbet
module Runtime
class InformationalError < StandardError; end
extend T::Sig
sig { void }
def self.silently_report_errors!
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/errors.rb | updater/lib/dependabot/updater/errors.rb | # typed: strong
# frozen_string_literal: true
module Dependabot
class Updater
class SubprocessFailed < StandardError
extend T::Sig
sig { returns(T::Hash[Symbol, T.untyped]) }
attr_reader :sentry_context
sig { params(message: String, sentry_context: T::Hash[Symbol, T.untyped]).void }
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations.rb | updater/lib/dependabot/updater/operations.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/updater/operations/create_security_update_pull_request"
require "dependabot/updater/operations/group_update_all_versions"
require "dependabot/updater/operations/refresh_group_update_pull_request"
require "dependabot/updater/ope... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/dependency_group_change_batch.rb | updater/lib/dependabot/updater/dependency_group_change_batch.rb | # typed: strict
# frozen_string_literal: true
require "pathname"
require "sorbet-runtime"
# This class is responsible for aggregating individual DependencyChange objects
# by tracking changes to individual files and the overall dependency list.
module Dependabot
class Updater
class DependencyGroupChangeBatch
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/group_update_refreshing.rb | updater/lib/dependabot/updater/group_update_refreshing.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
# This module contains the methods required to refresh (upsert or recreate)
# existing grouped pull requests.
#
# When included in an Operation it expects the following to be available:
# - job: the current Dependabot::Job object
# - dependency_sn... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/security_update_helpers.rb | updater/lib/dependabot/updater/security_update_helpers.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
# This module extracts all helpers required to perform additional update job
# error recording and logging for Security Updates since they are shared
# between a few operations.
module Dependabot
class Updater
module SecurityUpdateHelpers
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/error_handler.rb | updater/lib/dependabot/updater/error_handler.rb | # typed: strict
# frozen_string_literal: true
require "dependabot/errors"
require "dependabot/updater/errors"
require "octokit"
# This class is responsible for determining how to present a Dependabot::Error
# to the Service and Logger.
#
# TODO: Iterate further on leaner error handling
#
# This class is a coarse abst... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/group_dependency_selector.rb | updater/lib/dependabot/updater/group_dependency_selector.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "wildcard_matcher"
require "dependabot/utils"
require "dependabot/dependency_attribution"
require "dependabot/dependency_change"
require "dependabot/dependency_group"
require "dependabot/dependency_snapshot"
require "dependabot/updater/patt... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/update_type_helper.rb | updater/lib/dependabot/updater/update_type_helper.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/utils"
module Dependabot
class Updater
# UpdateTypeHelper provides utilities for determining the update type (major, minor, patch)
# of a dependency change. It works with different version class implementations across... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/group_update_creation.rb | updater/lib/dependabot/updater/group_update_creation.rb | # typed: strict
# frozen_string_literal: true
require "sorbet-runtime"
require "dependabot/dependency_change_builder"
require "dependabot/updater/dependency_group_change_batch"
require "dependabot/workspace"
require "dependabot/updater/security_update_helpers"
require "dependabot/notices"
# This module contains the ... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/pattern_specificity_calculator.rb | updater/lib/dependabot/updater/pattern_specificity_calculator.rb | # typed: strong
# frozen_string_literal: true
require "sorbet-runtime"
require "wildcard_matcher"
module Dependabot
class Updater
# PatternSpecificityCalculator handles the calculation of pattern specificity scores
# for dependency group patterns. This enables proper prioritization when a dependency
# m... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/create_security_update_pull_request.rb | updater/lib/dependabot/updater/operations/create_security_update_pull_request.rb | # typed: strict
# frozen_string_literal: true
require "dependabot/updater/security_update_helpers"
require "dependabot/notices"
# This class implements our strategy for updating a single, insecure dependency
# to a secure version. We attempt to make the smallest version update possible,
# i.e. semver patch-level incr... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/update_all_versions.rb | updater/lib/dependabot/updater/operations/update_all_versions.rb | # typed: strong
# frozen_string_literal: true
require "dependabot/updater/security_update_helpers"
require "dependabot/notices"
# This class implements our strategy for iterating over all of the dependencies
# for a specific project folder to find those that are out of date and create
# a single PR per Dependency.
mo... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/create_group_update_pull_request.rb | updater/lib/dependabot/updater/operations/create_group_update_pull_request.rb | # typed: strong
# frozen_string_literal: true
require "dependabot/updater/group_update_creation"
require "dependabot/updater/group_dependency_selector"
require "sorbet-runtime"
# This class implements our strategy for creating a single Pull Request which
# updates all outdated Dependencies within a specific project f... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/refresh_group_update_pull_request.rb | updater/lib/dependabot/updater/operations/refresh_group_update_pull_request.rb | # typed: strict
# frozen_string_literal: true
require "dependabot/updater/group_update_creation"
require "dependabot/updater/group_update_refreshing"
require "dependabot/updater/group_dependency_selector"
require "sorbet-runtime"
# This class implements our strategy for refreshing a single Pull Request which
# update... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/group_update_all_versions.rb | updater/lib/dependabot/updater/operations/group_update_all_versions.rb | # typed: strict
# frozen_string_literal: true
require "dependabot/updater/operations/create_group_update_pull_request"
require "dependabot/updater/operations/update_all_versions"
# This class is responsible for coordinating the creation and upkeep of Pull Requests for
# a given folder's defined DependencyGroups.
#
# ... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/refresh_security_update_pull_request.rb | updater/lib/dependabot/updater/operations/refresh_security_update_pull_request.rb | # typed: strong
# frozen_string_literal: true
require "dependabot/updater/security_update_helpers"
require "dependabot/notices"
# This class implements our strategy for 'refreshing' an existing Pull Request
# that updates an insecure dependency.
#
# TODO: copyedit
#
# It will determine if the existing diff is still r... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/updater/lib/dependabot/updater/operations/refresh_version_update_pull_request.rb | updater/lib/dependabot/updater/operations/refresh_version_update_pull_request.rb | # typed: strong
# frozen_string_literal: true
require "dependabot/updater/security_update_helpers"
require "dependabot/notices"
# This class implements our strategy for 'refreshing' an existing Pull Request
# that updates a dependnency to the latest permitted version.
#
# It will determine if the existing diff is sti... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/run.rb | bundler/helpers/v2/run.rb | # typed: true
# frozen_string_literal: true
gem "bundler", "~> 2.4"
require "bundler"
require "json"
$LOAD_PATH.unshift(File.expand_path("./lib", __dir__))
$LOAD_PATH.unshift(File.expand_path("./monkey_patches", __dir__))
trap "HUP" do
puts JSON.generate(error: "timeout", error_class: "Timeout::Error", trace: [])
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/monkey_patches/definition_bundler_version_patch.rb | bundler/helpers/v2/monkey_patches/definition_bundler_version_patch.rb | # typed: false
# frozen_string_literal: true
require "bundler/definition"
# Ignore the Bundler version specified in the Gemfile (since the only Bundler
# version available to us is the one we're using).
module BundlerDefinitionBundlerVersionPatch
def expanded_dependencies
@expanded_dependencies ||= (dependencie... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/monkey_patches/git_source_patch.rb | bundler/helpers/v2/monkey_patches/git_source_patch.rb | # typed: true
# frozen_string_literal: true
require "bundler/source"
module Bundler
class Source
class Git
class GitProxy
private
# Bundler allows ssh authentication when talking to GitHub but there's
# no way for Dependabot to do so (it doesn't have any ssh keys).
# Inste... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/monkey_patches/definition_ruby_version_patch.rb | bundler/helpers/v2/monkey_patches/definition_ruby_version_patch.rb | # typed: false
# frozen_string_literal: true
require "bundler/definition"
module BundlerDefinitionRubyVersionPatch
def ruby_version
super || begin
file_content = Bundler.read_file(".ruby-version")
ruby_version =
if /^ruby(-|\s+)([^\s#]+)/ =~ file_content
::Regexp.last_match(2)
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/shared_contexts.rb | bundler/helpers/v2/spec/shared_contexts.rb | # typed: false
# frozen_string_literal: true
require "tmpdir"
require "bundler/compact_index_client"
require "bundler/compact_index_client/updater"
TMP_DIR_PATH = File.expand_path("../tmp", __dir__)
RSpec.shared_context "when in a temporary bundler directory" do
let(:project_name) { "gemfile" }
let(:tmp_path) d... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/native_spec_helper.rb | bundler/helpers/v2/spec/native_spec_helper.rb | # typed: false
# frozen_string_literal: true
require "rspec/its"
require "webmock/rspec"
require "debug"
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
$LOAD_PATH.unshift(File.expand_path("../monkey_patches", __dir__))
$LOAD_PATH.unshift(File.expand_path("../../spec_helpers", __dir__))
# Bundler monkey patc... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/functions_spec.rb | bundler/helpers/v2/spec/functions_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe Functions do
include_context "when in a temporary bundler directory"
describe "#jfrog_source" do
let(:project_name) { "jfrog_source" }
it "returns the jfrog source" do
in_tmp_folder d... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/ruby_version_spec.rb | bundler/helpers/v2/spec/ruby_version_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe BundlerDefinitionRubyVersionPatch do
include_context "when in a temporary bundler directory"
include_context "when stubbing rubygems compact index"
let(:project_name) { "ruby_version_implied" }
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/functions/dependency_source_spec.rb | bundler/helpers/v2/spec/functions/dependency_source_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe Functions::DependencySource do
include_context "when in a temporary bundler directory"
let(:dependency_source) do
described_class.new(
gemfile_name: "Gemfile",
dependency_name: depen... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/functions/force_updater_spec.rb | bundler/helpers/v2/spec/functions/force_updater_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe Functions::ForceUpdater do
include_context "when in a temporary bundler directory"
include_context "when stubbing rubygems compact index"
let(:force_updater) do
described_class.new(
depe... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/functions/conflicting_dependency_resolver_spec.rb | bundler/helpers/v2/spec/functions/conflicting_dependency_resolver_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe Functions::ConflictingDependencyResolver do
include_context "when in a temporary bundler directory"
let(:conflicting_dependency_resolver) do
described_class.new(
dependency_name: dependenc... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/functions/version_resolver_spec.rb | bundler/helpers/v2/spec/functions/version_resolver_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe Functions::VersionResolver do
include_context "when in a temporary bundler directory"
include_context "when stubbing rubygems compact index"
let(:version_resolver) do
described_class.new(
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/spec/functions/file_parser_spec.rb | bundler/helpers/v2/spec/functions/file_parser_spec.rb | # typed: false
# frozen_string_literal: true
require "native_spec_helper"
require "shared_contexts"
RSpec.describe Functions::FileParser do
include_context "when in a temporary bundler directory"
let(:dependency_source) do
described_class.new(
lockfile_name: "Gemfile.lock"
)
end
describe "#par... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions.rb | bundler/helpers/v2/lib/functions.rb | # typed: true
# frozen_string_literal: true
require "functions/conflicting_dependency_resolver"
require "functions/dependency_source"
require "functions/file_parser"
require "functions/force_updater"
require "functions/lockfile_updater"
require "functions/version_resolver"
module Functions
class NotImplementedError... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions/conflicting_dependency_resolver.rb | bundler/helpers/v2/lib/functions/conflicting_dependency_resolver.rb | # typed: true
# frozen_string_literal: true
module Functions
class ConflictingDependencyResolver
def initialize(dependency_name:, target_version:, lockfile_name:)
@dependency_name = dependency_name
@target_version = target_version
@lockfile_name = lockfile_name
end
# Finds any dependen... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions/lockfile_updater.rb | bundler/helpers/v2/lib/functions/lockfile_updater.rb | # typed: true
# frozen_string_literal: true
require "fileutils"
module Functions
class LockfileUpdater
RETRYABLE_ERRORS = [Bundler::HTTPError].freeze
GEM_NOT_FOUND_ERROR_REGEX =
/
locked\sto\s(?<name>[^\s]+)\s\(|
not\sfind\s(?<name>[^\s]+)-\d|
has\s(?<name>[^\s]+)\slocked\sat
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions/force_updater.rb | bundler/helpers/v2/lib/functions/force_updater.rb | # typed: true
# frozen_string_literal: true
module Functions
class ForceUpdater
class TopLevelDependencyDowngradedError < StandardError; end
def initialize(
dependency_name:,
target_version:,
gemfile_name:,
lockfile_name:,
update_multiple_dependencies:
)
@dependency_n... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions/version_resolver.rb | bundler/helpers/v2/lib/functions/version_resolver.rb | # typed: true
# frozen_string_literal: true
module Functions
class VersionResolver
GEM_NOT_FOUND_ERROR_REGEX = /locked to (?<name>[^\s]+) \(/
attr_reader :dependency_name
attr_reader :dependency_requirements
attr_reader :gemfile_name
attr_reader :lockfile_name
def initialize(
dependen... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions/dependency_source.rb | bundler/helpers/v2/lib/functions/dependency_source.rb | # typed: true
# frozen_string_literal: true
module Functions
class DependencySource
attr_reader :gemfile_name
attr_reader :dependency_name
RUBYGEMS = "rubygems"
PRIVATE_REGISTRY = "private"
GIT = "git"
OTHER = "other"
def initialize(gemfile_name:, dependency_name:)
@gemfile_name =... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/v2/lib/functions/file_parser.rb | bundler/helpers/v2/lib/functions/file_parser.rb | # typed: true
# frozen_string_literal: true
require "uri"
module Functions
class FileParser
def initialize(lockfile_name:)
@lockfile_name = lockfile_name
end
attr_reader :lockfile_name
def parsed_gemfile(gemfile_name:)
Bundler::Definition.build(gemfile_name, nil, {})
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/helpers/spec_helpers/gem_net_http_adapter.rb | bundler/helpers/spec_helpers/gem_net_http_adapter.rb | # typed: strict
# frozen_string_literal: true
require "rubygems/vendored_net_http"
module WebMock
module HttpLibAdapters
class GemNetHttpAdapter < HttpLibAdapter
adapter_for :gem_net_http
OriginalGemNetHTTP = ::Gem::Net::HTTP unless const_defined?(:OriginalGemNetHTTP)
def self.enable!
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/shared_contexts.rb | bundler/spec/shared_contexts.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "bundler/compact_index_client"
require "bundler/compact_index_client/updater"
RSpec.shared_context "when stubbing rubygems compact index" do
before do
# Stub the Rubygems index
stub_request(:get, "https://index.rubygems.org/versions... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/spec_helper.rb | bundler/spec/spec_helper.rb | # typed: true
# frozen_string_literal: true
def common_dir
@common_dir ||= Gem::Specification.find_by_name("dependabot-common").gem_dir
end
def require_common_spec(path)
require "#{common_dir}/spec/dependabot/#{path}"
end
require "#{common_dir}/spec/spec_helper.rb"
module PackageManagerHelper
def self.bundler... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/subdependency_gems_rb/gems.rb | bundler/spec/fixtures/projects/bundler2/subdependency_gems_rb/gems.rb | source "https://rubygems.org"
gem "ibandit", "~> 0.7.0"
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/version_between_bounds_gems_rb/gems.rb | bundler/spec/fixtures/projects/bundler2/version_between_bounds_gems_rb/gems.rb | source "https://rubygems.org"
gem "business", "> 1.0.0", "< 1.5.0"
gem "statesman", "~> 1.2.0"
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/version_conflict_no_req_change_gems_rb/gems.rb | bundler/spec/fixtures/projects/bundler2/version_conflict_no_req_change_gems_rb/gems.rb | source "https://rubygems.org"
gem "ibandit", "~> 0.1"
gem "i18n", "~> 0.6"
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/version_specified_gems_rb/gems.rb | bundler/spec/fixtures/projects/bundler2/version_specified_gems_rb/gems.rb | source "https://rubygems.org"
gem "business", "~> 1.4.0"
gem "statesman", "~> 1.2.0"
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/includes_require_relative_nested/nested/some_other_file.rb | bundler/spec/fixtures/projects/bundler2/includes_require_relative_nested/nested/some_other_file.rb | SOME_CONSTANT = 5
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/includes_require_relative_gemfile/some_other_file.rb | bundler/spec/fixtures/projects/bundler2/includes_require_relative_gemfile/some_other_file.rb | SOME_CONSTANT = 5
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/gems_rb/gems.rb | bundler/spec/fixtures/projects/bundler2/gems_rb/gems.rb | # frozen_string_literal: true
source "https://rubygems.org"
gem "business", "~> 1.4.0"
gem "statesman", "~> 1.2.0"
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/fixtures/projects/bundler2/version_conflict_gems_rb/gems.rb | bundler/spec/fixtures/projects/bundler2/version_conflict_gems_rb/gems.rb | source "https://rubygems.org"
gem "rspec-mocks", "3.5.0"
gem "rspec-support", "3.5.0"
gem "diff-lcs", "1.2.0"
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler_spec.rb | bundler/spec/dependabot/bundler_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler"
require_common_spec "shared_examples_for_autoloading"
RSpec.describe Dependabot::Bundler do
it_behaves_like "it registers the required classes", "bundler"
end
| ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/requirement_spec.rb | bundler/spec/dependabot/bundler/requirement_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler/requirement"
RSpec.describe Dependabot::Bundler::Requirement do
subject(:requirement) { described_class.new(requirement_string) }
let(:requirement_string) { ">=1.0.0" }
describe ".new" do
it { is_expected.to be_... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/helper_spec.rb | bundler/spec/dependabot/bundler/helper_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler/helpers"
RSpec.describe Dependabot::Bundler::Helpers do
let(:no_lockfile) { nil }
let(:no_gemfile) { nil }
let(:no_ruby_version_file) { nil }
let(:gemfile_with_ruby_version) do
Dependabot::DependencyFile.new(na... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/native_helpers_spec.rb | bundler/spec/dependabot/bundler/native_helpers_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler/native_helpers"
RSpec.describe Dependabot::Bundler::NativeHelpers do
subject(:native_helper) { described_class }
describe ".run_bundler_subprocess" do
let(:options) { {} }
let(:native_helpers_path) { "/opt" }
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/metadata_finder_spec.rb | bundler/spec/dependabot/bundler/metadata_finder_spec.rb | # typed: false
# frozen_string_literal: true
require "octokit"
require "spec_helper"
require "dependabot/credential"
require "dependabot/dependency"
require "dependabot/bundler/metadata_finder"
require_common_spec "metadata_finders/shared_examples_for_metadata_finders"
RSpec.describe Dependabot::Bundler::MetadataFind... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/file_updater_spec.rb | bundler/spec/dependabot/bundler/file_updater_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "shared_contexts"
require "dependabot/bundler/file_updater"
require "dependabot/dependency_file"
require "dependabot/dependency"
require "dependabot/requirements_update_strategy"
require_common_spec "file_updaters/shared_examples_for_file_upda... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | true |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/update_checker_spec.rb | bundler/spec/dependabot/bundler/update_checker_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "shared_contexts"
require "dependabot/bundler/update_checker"
require "dependabot/dependency_file"
require "dependabot/dependency"
require "dependabot/requirements_update_strategy"
require_common_spec "update_checkers/shared_examples_for_updat... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | true |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/package_manager_spec.rb | bundler/spec/dependabot/bundler/package_manager_spec.rb | # typed: false
# frozen_string_literal: true
require "dependabot/bundler/package_manager"
require "dependabot/ecosystem"
require "spec_helper"
RSpec.describe Dependabot::Bundler::PackageManager do
let(:package_manager) do
described_class.new(
detected_version: detected_version,
raw_version: raw_vers... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/file_fetcher_spec.rb | bundler/spec/dependabot/bundler/file_fetcher_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler/file_fetcher"
require_common_spec "file_fetchers/shared_examples_for_file_fetchers"
RSpec.describe Dependabot::Bundler::FileFetcher do
let(:credentials) do
[{
"type" => "git_source",
"host" => "github.com"... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | true |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/file_parser_spec.rb | bundler/spec/dependabot/bundler/file_parser_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/source"
require "dependabot/dependency_file"
require "dependabot/bundler/file_parser"
require_common_spec "file_parsers/shared_examples_for_file_parsers"
RSpec.describe Dependabot::Bundler::FileParser do
let(:reject_external_code... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/language_spec.rb | bundler/spec/dependabot/bundler/language_spec.rb | # typed: false
# frozen_string_literal: true
require "dependabot/bundler/language"
require "dependabot/bundler/requirement"
require "dependabot/ecosystem"
require "spec_helper"
RSpec.describe Dependabot::Bundler::Language do
let(:language) { described_class.new(version, requirement) }
let(:version) { "3.0.0" }
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/dependency_grapher_spec.rb | bundler/spec/dependabot/bundler/dependency_grapher_spec.rb | # typed: strict
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler"
require "dependabot/dependency_graphers"
# TODO: Implement a concrete Bundler class
RSpec.describe "Dependabot::DependencyGraphers::Generic" do
context "with a bundler project" do
subject(:grapher) do
Dependab... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/file_parser/file_preparer_spec.rb | bundler/spec/dependabot/bundler/file_parser/file_preparer_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/dependency"
require "dependabot/bundler/file_parser/file_preparer"
RSpec.describe Dependabot::Bundler::FileParser::FilePreparer do
let(:preparer) { described_class.new(dependency_files: dependency_files) }
let(:dependency_file... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/file_parser/gemfile_declaration_finder_spec.rb | bundler/spec/dependabot/bundler/file_parser/gemfile_declaration_finder_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/dependency"
require "dependabot/dependency_file"
require "dependabot/bundler/file_parser/gemfile_declaration_finder"
RSpec.describe Dependabot::Bundler::FileParser::GemfileDeclarationFinder do
let(:checker) do
described_class... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/file_parser/gemspec_declaration_finder_spec.rb | bundler/spec/dependabot/bundler/file_parser/gemspec_declaration_finder_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/dependency"
require "dependabot/dependency_file"
require "dependabot/bundler/file_parser/gemspec_declaration_finder"
RSpec.describe Dependabot::Bundler::FileParser::GemspecDeclarationFinder do
let(:checker) do
described_class... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/package/package_details_fetcher_spec.rb | bundler/spec/dependabot/bundler/package/package_details_fetcher_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/credential"
require "dependabot/dependency_file"
require "dependabot/bundler/package/package_details_fetcher"
RSpec.describe Dependabot::Bundler::Package::PackageDetailsFetcher do
subject(:fetcher) do
described_class.new(
... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/update_checker/file_preparer_spec.rb | bundler/spec/dependabot/bundler/update_checker/file_preparer_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/dependency"
require "dependabot/bundler/update_checker/file_preparer"
RSpec.describe Dependabot::Bundler::UpdateChecker::FilePreparer do
let(:preparer) do
described_class.new(
dependency_files: dependency_files,
d... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/update_checker/requirements_updater_spec.rb | bundler/spec/dependabot/bundler/update_checker/requirements_updater_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "dependabot/bundler/update_checker/requirements_updater"
require "dependabot/requirements_update_strategy"
RSpec.describe Dependabot::Bundler::UpdateChecker::RequirementsUpdater do
let(:updater) do
described_class.new(
requirement... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/update_checker/force_updater_spec.rb | bundler/spec/dependabot/bundler/update_checker/force_updater_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "shared_contexts"
require "dependabot/bundler/update_checker/force_updater"
require "dependabot/dependency_file"
require "dependabot/dependency"
require "dependabot/requirements_update_strategy"
RSpec.describe Dependabot::Bundler::UpdateCheck... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
dependabot/dependabot-core | https://github.com/dependabot/dependabot-core/blob/5f5d8b92c51eefa3ec78a9e208f664e439134d76/bundler/spec/dependabot/bundler/update_checker/latest_version_finder_spec.rb | bundler/spec/dependabot/bundler/update_checker/latest_version_finder_spec.rb | # typed: false
# frozen_string_literal: true
require "spec_helper"
require "shared_contexts"
require "dependabot/dependency"
require "dependabot/dependency_file"
require "dependabot/bundler/update_checker/latest_version_finder"
require "dependabot/package/package_latest_version_finder"
RSpec.describe Dependabot::Bund... | ruby | MIT | 5f5d8b92c51eefa3ec78a9e208f664e439134d76 | 2026-01-04T15:43:10.347999Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.