Module: Semantic_Versions
- Included in:
- Install
- Defined in:
- lib/capistrano-karaf/semver.rb
Overview
Functions for semantic versions
Instance Method Summary collapse
-
#eq(installed, provided) ⇒ Object
Verify if the provided version is equal to the installed version.
-
#gt(installed, provided) ⇒ Object
Verify if the provided version is greater than the installed version.
-
#lt(installed, provided) ⇒ Object
Verify if the provided version is less than the installed version.
Instance Method Details
#eq(installed, provided) ⇒ Object
Verify if the provided version is equal to the installed version
Parameters
- installed - a string containing the installed version
- provided - a string containging the provided version
Example
eq("2.18.0", "2.19.0")
# returns false
Returns a boolean which is true if the provided is equal to the installed
45 46 47 |
# File 'lib/capistrano-karaf/semver.rb', line 45 def eq (installed, provided) compare(installed, provided) == :eq end |
#gt(installed, provided) ⇒ Object
Verify if the provided version is greater than the installed version
Parameters
- installed - a string containing the installed version
- provided - a string containging the provided version
Example
gt("2.18.0", "2.19.0")
# returns true
Returns a boolean which is true if the provided is greater than the installed
15 16 17 |
# File 'lib/capistrano-karaf/semver.rb', line 15 def gt (installed, provided) compare(installed, provided) == :gt end |
#lt(installed, provided) ⇒ Object
Verify if the provided version is less than the installed version
Parameters
- installed - a string containing the installed version
- provided - a string containging the provided version
Example
lt("2.18.0", "2.19.0")
# returns false
Returns a boolean which is true if the provided is less than the installed
30 31 32 |
# File 'lib/capistrano-karaf/semver.rb', line 30 def lt (installed, provided) compare(installed, provided) == :lt end |