Sha256: 00a18a334280469e94552b19a2253cb9095ba1b489a6fa204ff526fd9122ca84
Contents?: true
Size: 885 Bytes
Versions: 22
Compression:
Stored size: 885 Bytes
Contents
# frozen_string_literal: true # Rust pre-release versions use 1.0.1-rc1 syntax, which Gem::Version # converts into 1.0.1.pre.rc1. We override the `to_s` method to stop that # alteration. module Dependabot module Utils module Rust class Version < Gem::Version VERSION_PATTERN = '[0-9]+[0-9a-zA-Z]*(?>\.[0-9a-zA-Z]+)*' \ '(-[0-9A-Za-z-]+(\.[0-9a-zA-Z-]+)*)?' \ '(\+[0-9a-zA-Z]+(\.[0-9a-zA-Z]+)*)?' ANCHORED_VERSION_PATTERN = /\A\s*(#{VERSION_PATTERN})?\s*\z/.freeze def initialize(version) @version_string = version.to_s version, @build_version = version&.to_s&.split("+") super end def to_s @version_string end def inspect # :nodoc: "#<#{self.class} #{@version_string}>" end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems