summaryrefslogtreecommitdiff
path: root/lib/semver.rb
AgeCommit message (Collapse)AuthorFilesLines
2013-07-15properly handle max version on ppc debianSergey Sudakovich1-1/+1
2012-04-05(#13638) Add SemVer#pre functionKelsey Hightower1-6/+9
Before this patch the `SemVer#[]` method uses a `proc` to pre-process version strings, which seems a bit unnecessary when a method would do. This patch replaces the `proc` with the `SemVer#pre` method and updates the related specs.
2012-03-29(#13367) Patch SemVer to permit ranges including pre-release components.Pieter van de Bruggen1-7/+12
2012-02-15(#12256) Fix SemVer's range behavior to work with Ruby 1.9Matt Robinson1-11/+8
In Ruby 1.9 Range's implementation of include? changed so that if the objects being compared were non-numeric it would iterate over them instead of doing a comparison with the endpoints. We're subclassing numeric to force non-discrete range behavior. Numeric doesn't allow singleton methods to be defined, so we had to change the way inspect worked when dealing with MIN and MAX values. Paired-with: Pieter van de Bruggen <pieter@puppetlabs.com>
2012-02-15(#12424) Update SemVer to use ranges and new comparison operatorsMatt Robinson1-3/+57
Having range intersection allows easier checking of version constraints, and new comparson operators allow for ranged version constraints like you would expect from a typical packaging system (ex 1.2.x). There is also a slight change to the way prerelease version numbers are validated so that a dash is required between the patch version and prerelease string. This was done to comply with the declared semver spec: A pre-release version number MAY be denoted by appending an arbitrary string immediately following the patch version and a dash This could affect forge module versions, or face versions, but neither of these were found to be using prerelease versioning anyway. Pieter van de Bruggen was the original author of these changes, but I'm submitting them as part a larger rebase for module tool change. I've also reviewed the changes.
2011-07-19(#7204) Consolidate Semantic Versioning code.Pieter van de Bruggen1-0/+65
This introduces a class representing a semantic version, and implementing a few of the most common uses of them: validation, comparison, and finding the greatest available version matching a range. This refactoring also allows us to easily expand our matching of version ranges in the future, which is a big plus. Reviewed-By: Daniel Pittman