module Versions

Defined in:

versions.cr
versions/constraint.cr
versions/range.cr
versions/requirement.cr
versions/union.cr

Constant Summary

MATCH_REGEX = /^#{VERSION_RULE}(?:(?:,\s*)?#{VERSION_RULE})?$/
VERSION = "0.1.0"
VERSION_RULE = /(?:(==?|>=?|<=?|\^|~>?)\s*)?((?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?)?/

Class Method Summary

Class Method Detail

def self.parse(source : String) : Version #

[View source]