cvss-suite 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d6c9f7e41ba7184e8140cf17c6fc0a1b2dced70a3a0e80a603700c2517f413c
4
- data.tar.gz: 8277aaf7c847feb0d83adcf96f33e85dbbaa4916bb84fb3b1fad5fc1eb99ef57
3
+ metadata.gz: 9474da7f6ca4ff4f9016d55b23714c1a5ca7e1a6a1fce6e4fb74fddbda9ea757
4
+ data.tar.gz: a581c242701b79f72ef2b97208ab9a0524942dcba8ddca75a0df7b5ef0b36c71
5
5
  SHA512:
6
- metadata.gz: 3640b87d41a2b7533b756b416e115e8cde0bb4459a8aefe325d0db82816b48dc0b3f32bd2d6c9dde4ab48ec0bec94efc8572e0c94412618070a45ab04012dd04
7
- data.tar.gz: fe15648aa4362009d44ef9159e38f40494b09911582845b29732cb6c6512694c6bdf4d3b57ec412a6e9e76c783c197746dd76a2cce79ce298facad8f4a8ac334
6
+ metadata.gz: 2e3d15e35b59915b919faa4b99d3ff8a43d9b9ab231a9993e6b1876cd8b0c55ead7c73d0078a011245ebf40e6fa88f0abc9936eeb7af48c4972df8252d97e037
7
+ data.tar.gz: e061ce21c13ad6759b3b54f01d3330b339322213cf103fbe1350185da8dbf621d6a22ba211fd882fc174daec62ea42695a79ae37511adbe863b6b48fc75b4af2
@@ -8,9 +8,9 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  strategy:
10
10
  matrix:
11
- ruby: [ '2.6', '2.7', '3.0', '3.1' ]
11
+ ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2' ]
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Set up ${{ matrix.ruby }}
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
data/CHANGES.md CHANGED
@@ -2,6 +2,11 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## [3.1.1] - 2023-10-15
6
+
7
+ ### Fixes
8
+ * CVSS prefix is missing in v3.1.0. Fixes [#33](https://github.com/0llirocks/cvss-suite/issues/33)
9
+
5
10
  ## [3.1.0] - 2022-09-27
6
11
 
7
12
  ### Fixes
data/README.md CHANGED
@@ -18,6 +18,12 @@ Add this line to your application's Gemfile:
18
18
  gem 'cvss-suite'
19
19
  ```
20
20
 
21
+ Since the naming of this gem is not following the naming convention you can also add the following line to automatically require the gem:
22
+
23
+ ```ruby
24
+ gem 'cvss-suite', require: 'cvss_suite'
25
+ ```
26
+
21
27
  And then execute:
22
28
 
23
29
  $ bundle
@@ -1,7 +1,7 @@
1
1
  # CVSS-Suite, a Ruby gem to manage the CVSS vector
2
2
  #
3
3
  # Copyright (c) 2016-2022 Siemens AG
4
- # Copyright (c) 2022 0llirocks
4
+ # Copyright (c) 2022-2023 0llirocks
5
5
  #
6
6
  # Authors:
7
7
  # 0llirocks <http://0lli.rocks>
@@ -17,10 +17,6 @@ module CvssSuite
17
17
  # Metric of a CVSS vector.
18
18
  attr_reader :base, :temporal, :environmental
19
19
 
20
- ##
21
- # Returns the vector itself.
22
- attr_reader :vector
23
-
24
20
  ##
25
21
  # Creates a new CVSS vector by a +vector+.
26
22
  #
@@ -80,6 +76,12 @@ module CvssSuite
80
76
  base_score
81
77
  end
82
78
 
79
+ ##
80
+ # Returns the vector itself.
81
+ def vector
82
+ @vector.to_s
83
+ end
84
+
83
85
  private
84
86
 
85
87
  def extract_metrics
@@ -1,7 +1,7 @@
1
1
  # CVSS-Suite, a Ruby gem to manage the CVSS vector
2
2
  #
3
3
  # Copyright (c) 2016-2022 Siemens AG
4
- # Copyright (c) 2022 0llirocks
4
+ # Copyright (c) 2022-2023 0llirocks
5
5
  #
6
6
  # Authors:
7
7
  # 0llirocks <http://0lli.rocks>
@@ -45,6 +45,12 @@ module CvssSuite
45
45
  Cvss3Helper.round_up(@environmental.score(@base, @temporal))
46
46
  end
47
47
 
48
+ ##
49
+ # Returns the vector itself.
50
+ def vector
51
+ "#{CvssSuite::CVSS_VECTOR_BEGINNINGS.find { |beginning| beginning[:version] == version }[:string]}#{@vector}"
52
+ end
53
+
48
54
  private
49
55
 
50
56
  def init_metrics
@@ -1,7 +1,7 @@
1
1
  # CVSS-Suite, a Ruby gem to manage the CVSS vector
2
2
  #
3
3
  # Copyright (c) 2019-2022 Siemens AG
4
- # Copyright (c) 2022 0llirocks
4
+ # Copyright (c) 2022-2023 0llirocks
5
5
  #
6
6
  # Authors:
7
7
  # 0llirocks <http://0lli.rocks>
@@ -50,6 +50,12 @@ module CvssSuite
50
50
  Cvss31Helper.round_up(@environmental.score(@base, @temporal))
51
51
  end
52
52
 
53
+ ##
54
+ # Returns the vector itself.
55
+ def vector
56
+ "#{CvssSuite::CVSS_VECTOR_BEGINNINGS.find { |beginning| beginning[:version] == version }[:string]}#{@vector}"
57
+ end
58
+
53
59
  private
54
60
 
55
61
  def init_metrics
@@ -1,7 +1,7 @@
1
1
  # CVSS-Suite, a Ruby gem to manage the CVSS vector
2
2
  #
3
3
  # Copyright (c) 2016-2022 Siemens AG
4
- # Copyright (c) 2022 0llirocks
4
+ # Copyright (c) 2022-2023 0llirocks
5
5
  #
6
6
  # Authors:
7
7
  # 0llirocks <http://0lli.rocks>
@@ -10,5 +10,5 @@
10
10
  # See the LICENSE.md file in the top-level directory.
11
11
 
12
12
  module CvssSuite
13
- VERSION = '3.1.0'.freeze
13
+ VERSION = '3.1.1'.freeze
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cvss-suite
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0llirocks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-27 00:00:00.000000000 Z
11
+ date: 2023-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -121,7 +121,7 @@ licenses:
121
121
  metadata:
122
122
  bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
123
123
  changelog_uri: https://github.com/0llirocks/cvss-suite/blob/master/CHANGES.md
124
- documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.1.0
124
+ documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.1.1
125
125
  homepage_uri: https://cvss-suite.0lli.rocks
126
126
  source_code_uri: https://github.com/0llirocks/cvss-suite
127
127
  post_install_message: