cvss-suite 3.2.2 → 3.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7e95421f7d73fac437b3d59723213cf49773ee08ea56d07b7ac187ef6ec37c1
4
- data.tar.gz: 85d0b31cd41e67461d507498675cd63b25f6740f3f7eff18c3c6b08dce647d40
3
+ metadata.gz: 773b87ded42d73797271e4dd4c05a261b69bc957295fe75654084f4edf4a4521
4
+ data.tar.gz: e5ecc4e25e13cc8663ca12cbb8b065246ee25b0e44fbfb6bfdbbfdb61ef16b61
5
5
  SHA512:
6
- metadata.gz: 1b210dd4db1a4b43259689fb35aaf9678c1a25272174136fb37cad9ae825f3a012c6a0dd60f98cbb2e729b0f35dffcfce840f5682ff1f3206df89276aa79af90
7
- data.tar.gz: 0273cd45cfb5a59022e19479eef9807a2c12b46fc858c9406c9c13e96fa0689e395fde1550f9228edda30cd6614e5823f28bfda995898349d3c5943bfa969fa9
6
+ metadata.gz: 3538af971b672a09547bc6f1286714876c7fe4ee61d19d4fddfaf961c42b014040cabd4259c0e22cb177064109d877a7339101ff7258afeb1b3ed937ed3cc516
7
+ data.tar.gz: 8b3ffb3367ee5437b1ee0026ca7f1677da233c844124455886c580cb2cedc5cd0b72c712a920741dc942600fc58a99c4f88f3c6c3b23ae750c962e6cc3ba1907
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --warning
@@ -351,7 +351,7 @@ module CvssSuite
351
351
  end
352
352
 
353
353
  def concat_and_stringify(first, second, third, fourth, fifth, sixth)
354
- ''.concat(first.to_s, second.to_s, third.to_s, fourth.to_s, fifth.to_s, sixth.to_s)
354
+ String.new.concat(first.to_s, second.to_s, third.to_s, fourth.to_s, fifth.to_s, sixth.to_s)
355
355
  end
356
356
 
357
357
  def sum_or_nil(values)
@@ -41,5 +41,11 @@ module CvssSuite
41
41
 
42
42
  @all_up.score
43
43
  end
44
+
45
+ ##
46
+ # Alias for overall_score.
47
+ def score
48
+ overall_score
49
+ end
44
50
  end
45
51
  end
@@ -4,5 +4,5 @@
4
4
  # See the LICENSE.md file in the top-level directory.
5
5
 
6
6
  module CvssSuite
7
- VERSION = '3.2.2'.freeze
7
+ VERSION = '3.3.0'.freeze
8
8
  end
data/lib/cvss_suite.rb CHANGED
@@ -27,7 +27,12 @@ module CvssSuite
27
27
  def self.new(vector)
28
28
  return InvalidCvss.new unless vector.is_a? String
29
29
 
30
- @vector_string = vector
30
+ @vector_string = if vector.frozen?
31
+ vector.dup
32
+ else
33
+ vector
34
+ end
35
+
31
36
  case version
32
37
  when 2
33
38
  Cvss2.new(prepare_vector(@vector_string))
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.2.2
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0llirocks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-04 00:00:00.000000000 Z
11
+ date: 2024-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,7 +150,7 @@ licenses:
150
150
  metadata:
151
151
  bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
152
152
  changelog_uri: https://github.com/0llirocks/cvss-suite/blob/master/CHANGES.md
153
- documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.2.2
153
+ documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.3.0
154
154
  homepage_uri: https://cvss-suite.0lli.rocks
155
155
  source_code_uri: https://github.com/0llirocks/cvss-suite
156
156
  post_install_message: