Sha256: c3aca1314e42c9d26b0099df3fcc86fd961f039f073bfd1fecf65e4c8271469e

Contents?: true

Size: 655 Bytes

Versions: 7

Compression:

Stored size: 655 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)
        superclass.correct?(version_number_from_tag(tag))
      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

7 entries across 7 versions & 1 rubygems

Version Path
fastlane-2.71.0.beta.20171227010004 fastlane_core/lib/fastlane_core/tag_version.rb
fastlane-2.71.0.beta.20171226010004 fastlane_core/lib/fastlane_core/tag_version.rb
fastlane-2.71.0.beta.20171225010003 fastlane_core/lib/fastlane_core/tag_version.rb
fastlane-2.71.0.beta.20171224010003 fastlane_core/lib/fastlane_core/tag_version.rb
fastlane-2.71.0.beta.20171223010003 fastlane_core/lib/fastlane_core/tag_version.rb
fastlane-2.71.0.beta.20171222010003 fastlane_core/lib/fastlane_core/tag_version.rb
fastlane-2.70.3 fastlane_core/lib/fastlane_core/tag_version.rb