File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
lib/cc/engine/bundler_audit Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ module CC
2
2
module Engine
3
3
module BundlerAudit
4
4
class Remediation
5
+ MAJOR_UPGRADE_POINTS = 50_000_000
6
+ MINOR_UPGRADE_POINTS = 5_000_000
7
+ PATCH_UPGRADE_POINTS = 500_000
8
+ UNPATCHED_VERSION_POINTS = 500_000_000
9
+
10
+
5
11
def initialize ( gem_version , patched_versions )
6
12
@gem_version = gem_version
7
13
@patched_versions = patched_versions
@@ -12,15 +18,15 @@ def points
12
18
upgrade_versions . map do |upgrade_version |
13
19
case
14
20
when current_version . major != upgrade_version . major
15
- 50_000_000
21
+ MAJOR_UPGRADE_POINTS
16
22
when current_version . minor != upgrade_version . minor
17
- 5_000_000
23
+ MINOR_UPGRADE_POINTS
18
24
when current_version . tiny != upgrade_version . tiny
19
- 500_000
25
+ PATCH_UPGRADE_POINTS
20
26
end
21
27
end . min
22
28
else
23
- 500_000_000
29
+ UNPATCHED_VERSION_POINTS
24
30
end
25
31
end
26
32
You can’t perform that action at this time.
0 commit comments