Module: RSpec::SleepingKingStudios::Version Private

Defined in:
lib/rspec/sleeping_king_studios/version.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

The current version of the gem.

See Also:

Constant Summary collapse

MAJOR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Major version.

2
MINOR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Minor version.

7
PATCH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Patch version.

0
PRERELEASE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Prerelease version.

nil
BUILD =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Build metadata.

nil

Class Method Summary collapse

Class Method Details

.to_gem_versionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

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.

See Also:

  • SleepingKingStudios::Tools::SemanticVersion#to_gem_version


30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rspec/sleeping_king_studios/version.rb', line 30

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