cvss-suite 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/cvss_suite.gemspec +1 -0
- data/lib/cvss_suite/cvss40/cvss40_calc_helper.rb +9 -1
- data/lib/cvss_suite/version.rb +1 -1
- data/lib/cvss_suite.rb +0 -1
- metadata +4 -4
- data/lib/cvss_suite/extensions/string.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c13e3d336237b452f735f78972b31520c80115b7451bf81287f72a3b4b76d65a
|
4
|
+
data.tar.gz: fbbc06267f44b3ae4ddbafe5c0c3c2a50eeecec08dd95c1a3edb20ec15765307
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a4255bb0a792743a9013763620a5c93d3530ebbbd760d915f20569693ec85ff3cd44744b5aa19ef356fd6555fec935c4f8191d2844e61ee533662094379090f
|
7
|
+
data.tar.gz: aa99f6949546a68d0145a7a964d8188ca07fd8c6cde4b8d9df6fa1d324410f2ca3a98c3c38e875f44d84b388a0ee6f5e33ca1db0deab1447c7da325d9dc9654a
|
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.2.1] - 2024-05-25
|
6
|
+
|
7
|
+
### Fixes
|
8
|
+
* String.truncate method in Rails gets overwritten. Fixes [#39](https://github.com/0llirocks/cvss-suite/issues/39)
|
9
|
+
|
5
10
|
## [3.2.0] - 2024-05-04
|
6
11
|
|
7
12
|
### Improvements
|
data/cvss_suite.gemspec
CHANGED
@@ -26,6 +26,7 @@ in version 4.0, 3.1, 3.0 and 2.'
|
|
26
26
|
'bug_tracker_uri' => 'https://github.com/0llirocks/cvss-suite/issues',
|
27
27
|
'changelog_uri' => 'https://github.com/0llirocks/cvss-suite/blob/master/CHANGES.md',
|
28
28
|
'documentation_uri' => "https://www.rubydoc.info/gems/cvss-suite/#{CvssSuite::VERSION}",
|
29
|
+
'homepage_uri' => 'https://cvss-suite.0lli.rocks',
|
29
30
|
'source_code_uri' => 'https://github.com/0llirocks/cvss-suite'
|
30
31
|
}
|
31
32
|
|
@@ -377,7 +377,7 @@ module CvssSuite
|
|
377
377
|
# remove what follow
|
378
378
|
if extracted.index('/').positive?
|
379
379
|
index_to_drop_after = extracted.index('/') - 1
|
380
|
-
metric_val =
|
380
|
+
metric_val = truncate(extracted, index_to_drop_after)
|
381
381
|
elsif extracted
|
382
382
|
metric_val = extracted
|
383
383
|
# case where it is the last metric so no ending /
|
@@ -385,5 +385,13 @@ module CvssSuite
|
|
385
385
|
|
386
386
|
metric_val
|
387
387
|
end
|
388
|
+
|
389
|
+
# rails defines this method on String, so we need to avoid polluting the
|
390
|
+
# String class to preserve Rails behavior.
|
391
|
+
def truncate(string_to_truncate, truncate_to)
|
392
|
+
return string_to_truncate.dup unless string_to_truncate.length > truncate_to
|
393
|
+
|
394
|
+
(string_to_truncate[0, truncate_to + 1]).to_s
|
395
|
+
end
|
388
396
|
end
|
389
397
|
end
|
data/lib/cvss_suite/version.rb
CHANGED
data/lib/cvss_suite.rb
CHANGED
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.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0llirocks
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,7 +140,6 @@ files:
|
|
140
140
|
- lib/cvss_suite/cvss_metric.rb
|
141
141
|
- lib/cvss_suite/cvss_property.rb
|
142
142
|
- lib/cvss_suite/errors.rb
|
143
|
-
- lib/cvss_suite/extensions/string.rb
|
144
143
|
- lib/cvss_suite/helpers/cvss31_helper.rb
|
145
144
|
- lib/cvss_suite/helpers/cvss3_helper.rb
|
146
145
|
- lib/cvss_suite/invalid_cvss.rb
|
@@ -151,7 +150,8 @@ licenses:
|
|
151
150
|
metadata:
|
152
151
|
bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
|
153
152
|
changelog_uri: https://github.com/0llirocks/cvss-suite/blob/master/CHANGES.md
|
154
|
-
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.2.
|
153
|
+
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.2.1
|
154
|
+
homepage_uri: https://cvss-suite.0lli.rocks
|
155
155
|
source_code_uri: https://github.com/0llirocks/cvss-suite
|
156
156
|
post_install_message:
|
157
157
|
rdoc_options: []
|