{"id":22981051,"url":"https://github.com/rubyunworks/versus","last_synced_at":"2026-04-27T01:31:55.699Z","repository":{"id":6224350,"uuid":"7455791","full_name":"rubyworks/versus","owner":"rubyworks","description":"Best-of-Breed Version Class Library","archived":false,"fork":false,"pushed_at":"2013-01-16T17:08:03.000Z","size":224,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T13:36:28.406Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-05T13:49:46.000Z","updated_at":"2021-01-24T04:11:27.000Z","dependencies_parsed_at":"2022-09-15T12:40:59.844Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/versus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fversus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fversus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fversus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Fversus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/versus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229773540,"owners_count":18122031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T01:46:51.252Z","updated_at":"2026-04-27T01:31:55.674Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Homepage](http://rubyworks.github.com/versus) /\n[Report Issue](http://github.com/rubyworks/versus) /\n[Source Code](http://github.com/rubyworks/versus)\n( [![Build Status](https://travis-ci.org/rubyworks/versus.png)](https://travis-ci.org/rubyworks/versus) )\n\n\n# [Versus](http://rubyworks.github.com/versus)\n\n*A Best-of-Breed Version Class Library*\n\nThe Versus gem is a best-of-breed version number class library, providing classes\nfor a variety of version related requirements.\n\n\n## [Overview](#overview)\n\n### Version Number\n\nThe primary class of the Versus gem is the `Version::Number` class. It does\nexactly what one would expect, by taking a version literal and giving it a\nversitle interface to query and manipulate.\n\n```ruby\n    v = Version::Number.new('1.2.0')\n    v.major  #=\u003e 1\n    v.minor  #=\u003e 2\n    v.patch  #=\u003e 0\n```\n\nThe constructor can also take a tuple and `#[]` is provided as a convenient alias.\n\n```ruby\n    v = Version::Number[1,2,0]\n```\n\nThe Version::Number class has a number of useful methods, such as `#satisfy`.\n\n```ruby\n    v.satisfy?(\"\u003e 1.0\")\n```\n\n### Version Constraint\n\nVersus also provides a standalone constraint class.\n\n```ruby\n    c = Version::Constraint.new(\"~\u003e 1.2.0\")\n```\n\nThen versions can be tested against the constraint.\n\n```ruby\n    c.satisfy?(\"1.2.1\")\n```\n\n### Version Resolver\n\nThe `Version::Resolver` class is a powerful tool for taking a set of interdpendent\nnamed version requirements and resolving them for the best solution.\n\n\n### Version File\n\nA `Version::File` class is provided to reading and parsing the typical project VERSION file.\n\n\n\n## [Documentation](#documentation)\n\nVersus uses QED to provided tested [demonstrations](http://). This provides a end-user \nacceptance testing while also providing very readable documentation.\n\nFor API documentation checkout the YARD generated docs at [RubyDoc.Info](http://rubydoc.info/gems/versus/frames).\n\n\n## [Copyrights](#copyrights)\n\nVersus is copyrighted open source software.\n\n    Copyright 2011 Rubyworks\n\nVersus can be modified and redistributed in accordance with the\n[BSD-2-Clause](http://spdx.org/licenses/bsd-2-clause) License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyunworks%2Fversus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyunworks%2Fversus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyunworks%2Fversus/lists"}