Sha256: 9ba1aa4b55b0223a5bdc56b03a23b45041b9e3374771fe0cbf8b2f75b2bedcc3

Contents?: true

Size: 918 Bytes

Versions: 1

Compression:

Stored size: 918 Bytes

Contents

## Install

    gem install version_info

## Usage:


Include VersionInfo in your main project module (or class):

    require 'version_info'

    module MyProject
      include VersionInfo

    end

Create a file to store your version data. By default the file is named version_info.yml:

    --- 
    major: 0
    minor: 1
    patch: 0
    author: jcangas


Note you can put any custom data. In order to get the version tag, VersionInfo reserve some special keys
for use as the "segments" of the version tag:

    module VersionInfo

      def self.segments
        [:major, :minor, :patch, :state, :build]
      end

      ...
    end

Usingh the previous version_info.yml:

    puts MyProject::VERSION.tag

    => 0.1.0

Also you can bump any segment. With the same sample:

    MyProject::VERSION.bump(:major)
    puts MyProject::VERSION.tag

    => 1.0.0

Note the other segments are reset to 0 after bump.
    

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
version_info-0.3.0 README.md