cvss-suite 1.1.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- data/.github/ISSUE_TEMPLATE/custom.md +7 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- data/.github/workflows/rspec.yml +23 -0
- data/.github/workflows/rubocop.yml +21 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +45 -1
- data/.rubocop_todo.yml +59 -0
- data/CHANGES.md +61 -1
- data/PULL_REQUEST_TEMPLATE.md +24 -0
- data/README.md +43 -16
- data/_config.yml +1 -0
- data/bin/console +3 -3
- data/cvss_suite.gemspec +14 -13
- data/lib/cvss_suite.rb +13 -11
- data/lib/cvss_suite/cvss.rb +85 -73
- data/lib/cvss_suite/cvss2/cvss2.rb +39 -36
- data/lib/cvss_suite/cvss2/cvss2_base.rb +69 -75
- data/lib/cvss_suite/cvss2/cvss2_environmental.rb +52 -54
- data/lib/cvss_suite/cvss2/cvss2_temporal.rb +40 -41
- data/lib/cvss_suite/cvss3/cvss3.rb +39 -36
- data/lib/cvss_suite/cvss3/cvss3_base.rb +72 -75
- data/lib/cvss_suite/cvss3/cvss3_environmental.rb +159 -109
- data/lib/cvss_suite/cvss3/cvss3_temporal.rb +41 -42
- data/lib/cvss_suite/cvss31/cvss31.rb +60 -0
- data/lib/cvss_suite/cvss31/cvss31_base.rb +93 -0
- data/lib/cvss_suite/cvss31/cvss31_environmental.rb +194 -0
- data/lib/cvss_suite/cvss31/cvss31_temporal.rb +56 -0
- data/lib/cvss_suite/cvss_metric.rb +31 -35
- data/lib/cvss_suite/cvss_property.rb +57 -56
- data/lib/cvss_suite/helpers/cvss31_helper.rb +27 -0
- data/lib/cvss_suite/helpers/cvss3_helper.rb +21 -15
- data/lib/cvss_suite/invalid_cvss.rb +37 -45
- data/lib/cvss_suite/version.rb +2 -2
- metadata +21 -25
- data/.travis.yml +0 -4
- data/lib/cvss_suite/helpers/extensions.rb +0 -32
data/.travis.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
-
#
|
3
|
-
# Copyright (c) Siemens AG, 2016
|
4
|
-
#
|
5
|
-
# Authors:
|
6
|
-
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
-
#
|
8
|
-
# This work is licensed under the terms of the MIT license.
|
9
|
-
# See the LICENSE.md file in the top-level directory.
|
10
|
-
|
11
|
-
##
|
12
|
-
# This class includes extensions for the Float datatype.
|
13
|
-
|
14
|
-
class Float
|
15
|
-
|
16
|
-
##
|
17
|
-
# Since CVSS 3 all float values are rounded up, therefore this method is used instead of the mathematically correct method round().
|
18
|
-
|
19
|
-
def round_up(decimal_paces = 0)
|
20
|
-
(self * 10.0**decimal_paces).ceil / 10.0**decimal_paces
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
class Fixnum
|
25
|
-
|
26
|
-
##
|
27
|
-
# Since CVSS 3 all float values are rounded up, therefore this method is used instead of the mathematically correct method round().
|
28
|
-
|
29
|
-
def round_up(decimal_paces = 0)
|
30
|
-
(self * 10.0**decimal_paces).ceil / 10.0**decimal_paces
|
31
|
-
end
|
32
|
-
end
|