Sha256: c84e18f90993eb2d4d5f96efc38a741fe1b0304924d4d08a1f4632256ce89d23

Contents?: true

Size: 1.59 KB

Versions: 1

Compression:

Stored size: 1.59 KB

Contents

module Metasploit
  module Concern
    # Holds components of {VERSION} as defined by {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0}.
    module Version
      # The major version number.
      MAJOR = 0
      # The minor version number, scoped to the {MAJOR} version number.
      MINOR = 3
      # The patch number, scoped to the {MAJOR} and {MINOR} version numbers.
      PATCH = 1
      # The prerelease version, scoped to the {MAJOR}, {MINOR}, and {PATCH} version numbers.
      PRERELEASE = 'autoload-compatibility'

      # The full version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the `PRERELEASE` in the
      # {http://semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.
      #
      # @return [String] '{MAJOR}.{MINOR}.{PATCH}' on master.  '{MAJOR}.{MINOR}.{PATCH}-<PRERELEASE>' on any branch
      #   other than master.
      def self.full
        version = "#{MAJOR}.#{MINOR}.#{PATCH}"

        if defined? PRERELEASE
          version = "#{version}-#{PRERELEASE}"
        end

        version
      end

      # The full gem version string, including the {MAJOR}, {MINOR}, {PATCH}, and optionally, the {PRERELEASE} in the
      # {http://guides.rubygems.org/specification-reference/#version RubyGems versioning} format.
      #
      # @return [String] '{MAJOR}.{MINOR}.{PATCH}' on master.  '{MAJOR}.{MINOR}.{PATCH}.{PRERELEASE}' on any branch
      #   other than master.
      def self.gem
        full.gsub('-', '.pre.')
      end
    end

    # @see Version.gem
    GEM_VERSION = Version.gem

    # @see Version.full
    VERSION = Version.full
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
metasploit-concern-0.3.1.pre.autoload.pre.compatibility lib/metasploit/concern/version.rb