Sha256: 47e0ea036a7f22fbdae9f4318e869511787bae6ea78eb77de6babeebdc54b91b
Contents?: true
Size: 947 Bytes
Versions: 3
Compression:
Stored size: 947 Bytes
Contents
require "rubygems/version" module FastlaneCore # Utility class to construct a Gem::Version from a tag. # Accepts vX.Y.Z and X.Y.Z. class TagVersion < Gem::Version class << self def correct?(tag) result = superclass.correct?(version_number_from_tag(tag)) # It seems like depending on the Ruby env, the result is # slightly different. We actually just want `true` and `false` # values here return false if result.nil? return true if result == 0 return result end # Gem::Version.new barfs on things like "v0.1.0", which is the style # generated by the rake release task. Just strip off any initial v # to generate a Gem::Version from a tag. def version_number_from_tag(tag) tag.sub(/^v/, "") end end def initialize(tag) super(self.class.version_number_from_tag(tag)) end end end
Version data entries
3 entries across 3 versions & 1 rubygems