-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: David Crosby <[email protected]>
- Loading branch information
1 parent
ed9334e
commit f0f0cac
Showing
6 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ class Format | |
# @author Seth Chisamore (<[email protected]>) | ||
# @author Christopher Maier (<[email protected]>) | ||
class GitDescribe < Format | ||
GIT_DESCRIBE_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:\-|\.)?(.+)?\-(\d+)\-g([a-f0-9]{7,40})(?:\-)?(\d+)?$/ | ||
GIT_DESCRIBE_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:\-|\.)?(.+)?\-(\d+)\-g([a-f0-9]{7,40})(?:\-)?(\d+)?$/.freeze | ||
|
||
attr_reader :commits_since, :commit_sha | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,7 @@ class Format | |
# @author Christopher Maier (<[email protected]>) | ||
class OpscodeSemVer < SemVer | ||
# The pattern is: `YYYYMMDDHHMMSS.git.COMMITS_SINCE.SHA1` | ||
OPSCODE_BUILD_REGEX = /^\d{14}(\.git\.\d+\.[a-f0-9]{7})?$/ | ||
OPSCODE_BUILD_REGEX = /^\d{14}(\.git\.\d+\.[a-f0-9]{7})?$/.freeze | ||
|
||
# Allows the following: | ||
# | ||
|
@@ -65,7 +65,7 @@ class OpscodeSemVer < SemVer | |
# rc, rc.0, rc.1, rc.2, etc. | ||
# ``` | ||
# | ||
OPSCODE_PRERELEASE_REGEX = /^(alpha|beta|rc)(\.\d+)?$/ | ||
OPSCODE_PRERELEASE_REGEX = /^(alpha|beta|rc)(\.\d+)?$/.freeze | ||
|
||
# @see SemVer#parse | ||
def parse(version_string) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ class Format | |
# @author Ryan Hass (<[email protected]>) | ||
class PartialSemVer < Format | ||
# http://rubular.com/r/NmRSN8vCie | ||
PARTIAL_REGEX = /^(\d+)\.?(?:(\d*))$/ | ||
PARTIAL_REGEX = /^(\d+)\.?(?:(\d*))$/.freeze | ||
# @see Format#parse | ||
def parse(version_string) | ||
match = version_string.match(PARTIAL_REGEX) rescue nil | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ class Format | |
# @author Seth Chisamore (<[email protected]>) | ||
# @author Christopher Maier (<[email protected]>) | ||
class Rubygems < Format | ||
RUBYGEMS_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:\.([[:alnum:]]+(?:\.[[:alnum:]]+)?))?(?:\-(\d+))?$/ | ||
RUBYGEMS_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:\.([[:alnum:]]+(?:\.[[:alnum:]]+)?))?(?:\-(\d+))?$/.freeze | ||
|
||
# @see Format#parse | ||
def parse(version_string) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ class Format | |
# @author Seth Chisamore (<[email protected]>) | ||
# @author Christopher Maier (<[email protected]>) | ||
class SemVer < Format | ||
SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/ | ||
SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][a-zA-Z0-9-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.freeze | ||
|
||
# @see Format#parse | ||
def parse(version_string) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ | |
|
||
module Mixlib | ||
class Versioning | ||
VERSION = "1.2.18" | ||
VERSION = "1.2.18".freeze | ||
end | ||
end |