Sha256: c57cf0394f6615b71d4a814c83ba7cf7733b0d4048247bbe4a3afb8de74df29b
Contents?: true
Size: 779 Bytes
Versions: 48
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true require "rubygems_version_patch" # JavaScript 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. # # See https://semver.org/ for details of node's version syntax. module Dependabot module Utils module JavaScript class Version < Gem::Version def self.correct?(version) version = version.gsub(/^v/, "") if version.is_a?(String) super(version) end def initialize(version) @version_string = version.to_s version = version.gsub(/^v/, "") if version.is_a?(String) super end def to_s @version_string end end end end end
Version data entries
48 entries across 48 versions & 1 rubygems