pub/lib/dependabot/pub/update_checker.rb
def version_unless_ignored(unparsed_version, current_version: nil)
        if git_revision?(unparsed_version)
          unparsed_version
        else
          new_version = Dependabot::Pub::Version.new(unparsed_version)
          if !current_version.nil? && !git_revision?(current_version) &&
             Dependabot::Pub::Version.new(current_version) == new_version
            return new_version
          end
          return nil if ignore_requirements.any? { |r| r.satisfied_by?(new_version) }

          new_version
        end
      end
# Returns unparsed_version if it looks like a git-revision.
#
# Otherwise it will be parsed with Dependabot::Pub::Version.new and
# checked against the ignored_requirements:
#
# * If not ignored the parsed Version object will be returned.
# * If current_version is non-nil and the parsed version is the same it
#   will be returned.
# * Otherwise returns nil
Returns unparsed_version if it looks like a git-revision.
Otherwise it will be parsed with Dependabot::Pub::Version.new and
checked against the ignored_requirements.

If not ignored the parsed Version object will be returned.
If current_version is non-nil and the parsed version is the same it
will be returned.
Otherwise returns nil
Returns unparsed_version if it looks like a git - revision . Otherwise it will be parsed with Dependabot :: Pub :: Version . new and checked against the ignored_requirements . If not ignored the parsed Version object will be returned . If current_version is non - nil and the parsed version is the same it will be returned . Otherwise returns nil
def version_unless_ignored(unparsed_version, current_version: nil)
        if git_revision?(unparsed_version)
          unparsed_version
        else
          new_version = Dependabot::Pub::Version.new(unparsed_version)
          if !current_version.nil? && !git_revision?(current_version) &&
             Dependabot::Pub::Version.new(current_version) == new_version
            return new_version
          end
          return nil if ignore_requirements.any? { |r| r.satisfied_by?(new_version) }
          new_version
        end
      end
def version_unless_ignored ( unparsed_version , current_version : nil ) if git_revision? ( unparsed_version ) unparsed_version else new_version = Dependabot :: Pub :: Version . new ( unparsed_version ) if ! current_version . nil? && ! git_revision? ( current_version ) && Dependabot :: Pub :: Version . new ( current_version ) == new_version return new_version end return nil if ignore_requirements . any? { | r | r . satisfied_by? ( new_version ) } new_version end end
Returns unparsed_version if it looks like a git-revision.
Returns unparsed_version if it looks like a git - revision .
unparsed_version
current_version