Exception: Dependabot::BlockedDependencyVersion
- Inherits:
-
DependabotError
- Object
- StandardError
- DependabotError
- Dependabot::BlockedDependencyVersion
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/errors.rb
Overview
Raised when regenerating a lockfile would introduce or change a transitive (indirect) dependency to a version that matches a configured blocked version. The offending change is rejected so the blocked version is never shipped, while other dependencies are still allowed to update.
Constant Summary
Constants inherited from DependabotError
DependabotError::BASIC_AUTH_REGEX, DependabotError::FURY_IO_PATH_REGEX
Instance Attribute Summary collapse
-
#blocked_version ⇒ Object
readonly
Returns the value of attribute blocked_version.
-
#dependency_name ⇒ Object
readonly
Returns the value of attribute dependency_name.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#version_requirement ⇒ Object
readonly
Returns the value of attribute version_requirement.
Instance Method Summary collapse
-
#initialize(dependency_name:, blocked_version:, version_requirement:, reason: nil) ⇒ BlockedDependencyVersion
constructor
A new instance of BlockedDependencyVersion.
Constructor Details
#initialize(dependency_name:, blocked_version:, version_requirement:, reason: nil) ⇒ BlockedDependencyVersion
Returns a new instance of BlockedDependencyVersion.
962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/dependabot/errors.rb', line 962 def initialize(dependency_name:, blocked_version:, version_requirement:, reason: nil) @dependency_name = dependency_name @blocked_version = blocked_version @version_requirement = version_requirement @reason = reason msg = "Update blocked: transitive dependency #{dependency_name} #{blocked_version} " \ "matches blocked version requirement '#{version_requirement}'" msg += " (reason: #{reason})" if reason && !reason.empty? super(msg) end |
Instance Attribute Details
#blocked_version ⇒ Object (readonly)
Returns the value of attribute blocked_version.
946 947 948 |
# File 'lib/dependabot/errors.rb', line 946 def blocked_version @blocked_version end |
#dependency_name ⇒ Object (readonly)
Returns the value of attribute dependency_name.
943 944 945 |
# File 'lib/dependabot/errors.rb', line 943 def dependency_name @dependency_name end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
952 953 954 |
# File 'lib/dependabot/errors.rb', line 952 def reason @reason end |
#version_requirement ⇒ Object (readonly)
Returns the value of attribute version_requirement.
949 950 951 |
# File 'lib/dependabot/errors.rb', line 949 def version_requirement @version_requirement end |