Module: SleepingKingStudios::Tools::Version
- Defined in:
- lib/sleeping_king_studios/tools/version.rb
Overview
SleepingKingStudios::Tools uses semantic versioning.
Constant Summary collapse
- MAJOR =
Major version.
1- MINOR =
Minor version.
3- PATCH =
Patch version.
0- PRERELEASE =
Prerelease version.
nil- BUILD =
Build metadata.
nil
Class Method Summary collapse
-
.to_gem_version ⇒ Object
Generates the gem version string from the Version constants.
Class Method Details
.to_gem_version ⇒ Object
Generates the gem version string from the Version constants.
Inlined here because dependencies may not be loaded when processing a gemspec, which results in the user being unable to install the gem for the first time.
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/sleeping_king_studios/tools/version.rb', line 28 def to_gem_version str = "#{MAJOR}.#{MINOR}.#{PATCH}" prerelease = value_of(:PRERELEASE) str = "#{str}.#{prerelease}" if prerelease build = value_of(:BUILD) str = "#{str}.#{build}" if build str end |