Project

versus

0.0
No commit activity in last 3 years
No release in over 3 years
The Versus gem provides a solid Version class along with supporting functionality, such as version constratints and version dependency resolution.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

Homepage / Report Issue / Source Code ( Build Status )

A Best-of-Breed Version Class Library

The Versus gem is a best-of-breed version number class library, providing classes for a variety of version related requirements.

Overview

Version Number

The primary class of the Versus gem is the Version::Number class. It does exactly what one would expect, by taking a version literal and giving it a versitle interface to query and manipulate.

    v = Version::Number.new('1.2.0')
    v.major  #=> 1
    v.minor  #=> 2
    v.patch  #=> 0

The constructor can also take a tuple and #[] is provided as a convenient alias.

    v = Version::Number[1,2,0]

The Version::Number class has a number of useful methods, such as #satisfy.

    v.satisfy?("> 1.0")

Version Constraint

Versus also provides a standalone constraint class.

    c = Version::Constraint.new("~> 1.2.0")

Then versions can be tested against the constraint.

    c.satisfy?("1.2.1")

Version Resolver

The Version::Resolver class is a powerful tool for taking a set of interdpendent named version requirements and resolving them for the best solution.

Version File

A Version::File class is provided to reading and parsing the typical project VERSION file.

Documentation

Versus uses QED to provided tested demonstrations. This provides a end-user acceptance testing while also providing very readable documentation.

For API documentation checkout the YARD generated docs at RubyDoc.Info.

Copyrights

Versus is copyrighted open source software.

Copyright 2011 Rubyworks

Versus can be modified and redistributed in accordance with the BSD-2-Clause License.