push
github
0 of 2 new or added lines in 1 file covered. (0.0%)
1930 existing lines in 59 files now uncovered.0 of 2023 relevant lines covered (0.0%)
0.0 hits per line
UNCOV
1
|
module Unleash |
× |
UNCOV
2
|
module ConstraintMatcher |
× |
UNCOV
3
|
class SemverConstraint |
× |
UNCOV
4
|
OPERATORS = [
|
× |
5 |
'SEMVER_EQ',
|
|
6 |
'SEMVER_GT',
|
|
7 |
'SEMVER_LT'
|
|
8 |
].freeze |
|
9 |
|
|
UNCOV
10
|
def self.matches?(operator, context_value, constraint_value) |
× |
UNCOV
11
|
begin
|
× |
UNCOV
12
|
context_value = Gem::Version.new(context_value) |
× |
UNCOV
13
|
constraint_value = Gem::Version.new(constraint_value) |
× |
14 |
rescue ArgumentError |
|
15 |
false
|
× |
16 |
end
|
|
17 |
|
|
UNCOV
18
|
case operator
|
× |
19 |
when "SEMVER_EQ" |
|
UNCOV
20
|
constraint_value == context_value |
× |
21 |
when "SEMVER_GT" |
|
UNCOV
22
|
constraint_value < context_value |
× |
23 |
when "SEMVER_LT" |
|
UNCOV
24
|
constraint_value > context_value |
× |
25 |
end
|
|
26 |
end
|
|
27 |
|
|
UNCOV
28
|
def self.include?(operator) |
× |
UNCOV
29
|
OPERATORS.include? operator
|
× |
30 |
end
|
|
31 |
end
|
|
32 |
end
|
|
33 |
end
|