Nothing has been indexed for 0.4.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  semantic_compare:
    github: j8r/semantic_compare
    version: ~> 0.4.0

Then run:

shards install

shard.yml

No shard.yml has been indexed for 0.4.0. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.

SemanticCompare

Build Status ISC

Compare semver versions using semantic expressions.

Most of the npm's semver implementation expressions are supported.

This library is based on stdlib's SemanticVersion.

Documentation

https://j8r.github.io/semantic_compare

Installation

Add the dependency to your shard.yml:

dependencies:
  semantic_compare:
    github: j8r/semantic_compare

Usage

Compare with simple expressions

require "semantic_compare"

semantic_version = SemanticVersion.new "1.2.3"

SemanticCompare.simple_expression semantic_version, "<1.5.0"        #=> true
SemanticCompare.simple_expression semantic_version, "1.2.0 - 1.4.0" #=> true

Compare with complex expressions, which can include 'or' || signs

require "semantic_compare"

# Compare with simple expressions
semantic_version = SemanticVersion.new "1.2.3"

SemanticCompare.complex_expression semantic_version, ">1.2.3 <2.0.0"               #=> true
SemanticCompare.complex_expression semantic_version, ">=1.0.4 || <2.0.0 || ~1.2.1" #=> true

License

Copyright (c) 2017-2020 Julien Reichardt - ISC License