Class | Buildr::ArtifactNamespace::ArtifactRequirement |
In: |
lib/buildr/packaging/artifact_namespace.rb
(CVS)
|
Parent: | Object |
An artifact requirement is an object that ActsAsArtifact and has an associated VersionRequirement. It also knows the name (some times equal to the artifact id) that is used to store it in an ArtifactNamespace.
name | [R] | |
requirement | [R] | |
version | [RW] |
Create a requirement from an `artifact requirement spec`. This spec has three parts, separated by ->
some_name -> ar:ti:fact:3.2.5 -> ( >2 & <4)
As you can see it‘s just an artifact spec, prefixed with
some_name ->
the :some_name symbol becomes this object‘s name and is used to store it on an ArtifactNamespace.
ar:ti:fact:3.2.5
The second part is an artifact spec by itself, and specifies all remaining attributes, the version of this spec becomes the default version of this requirement.
The last part consist of a VersionRequirement.
-> ( >2 & <4)
VersionRequirement supports RubyGem‘s comparision operators in adition to parens, logical and, logical or and negation. See the docs for VersionRequirement for more info on operators.
Set a the requirement, this must be an string formatted for VersionRequirement#create to parse.