Module: VersionBoss::Semver
- Defined in:
- lib/version_boss/semver.rb,
lib/version_boss/semver/regexp.rb,
lib/version_boss/semver/version.rb,
lib/version_boss/semver/incrementable_version.rb
Overview
Classes for working with Gem versions
Defined Under Namespace
Classes: IncrementableVersion, Version
Constant Summary collapse
- REGEXP =
Match a semver within a string
/ (?<semver> (?<major>0|[1-9]\d*) \. (?<minor>0|[1-9]\d*) \. (?<patch>0|[1-9]\d*) (?:- (?<pre_release> (?: 0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]* ) (?: \. (?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*) )* ) )? (?: \+ (?<build_metadata> [0-9a-zA-Z-]+ (?: \. [0-9a-zA-Z-]+ )* ) )? ) /x
- REGEXP_FULL =
Match a semver to the full string
/\A#{REGEXP.source}\z/x