cvss-suite 1.0.7 → 1.0.8

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
  SHA1:
3
- metadata.gz: d74ead7a3dfceafd4292917318ab763a6d902c05
4
- data.tar.gz: 254e449241c6373100c4cfc7110df97bac6baefe
3
+ metadata.gz: 41f9d10edef456e09bc17730d1454e427fe94051
4
+ data.tar.gz: 65e623ddcc212a84ed9b0d298674738a4398a37f
5
5
  SHA512:
6
- metadata.gz: 8c2a24225c7553fdfe29dc72d7b60fd838118108aa66064b4b7aa449e77592cd5a98cc40c1d55921f47670190c66627252b13ba54335409996ae6656614c8c22
7
- data.tar.gz: ae7830eb097da0f0fa61e64a78be2f415a0ce60180f70756133475040ed78f85533a350e6f26e6dd73d6e3857340035d32636bd52070ed93a36b9321dc626821
6
+ metadata.gz: ec8fc50a1474c128b48e6cf53f734bd159f975587841d163169a8b19b1da9319f466b5e1b4cde6ef1ff8be931ca04eea17349602ede0ce60ab4b9af1a5af7702
7
+ data.tar.gz: 9b32af943a44ba5ce43e2f7fcea76b36b3749ca6d32402d6c37e838a838e52c81806dfcc68913b3e5f25a242b7e53608a6173eea3a9fc5f68cb709b11d1bec23
data/CHANGES.md CHANGED
@@ -2,6 +2,10 @@
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
+ ## [1.0.8] - 2016-09-30
6
+ ### Fixes
7
+ Fixed a bug with rounding Fixnums in CVSS3.
8
+
5
9
  ## [1.0.7] - 2016-06-23
6
10
  ### Improvements
7
11
  Removed gems: Rake & badgerbadgerbadger. Improved documentation, webpage (github) is coming very soon!
@@ -1,3 +1,12 @@
1
+ CVSS-Suite, a Ruby gem to manage the CVSS vector
2
+
3
+ Copyright (c) Siemens AG, 2016
4
+
5
+ Authors: Oliver Hambörger <oliver.hamboerger@siemens.com>
6
+
7
+ This work is licensed under the terms of the MIT license.
8
+ See the LICENSE.md file in the top-level directory.
9
+
1
10
  # Contributor Covenant Code of Conduct
2
11
 
3
12
  ## Our Pledge
data/Gemfile CHANGED
@@ -1,3 +1,13 @@
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
+
1
11
  source 'https://rubygems.org'
2
12
 
3
13
  # Specify your gem's dependencies in cvss_suite.gemspec
data/README.md CHANGED
@@ -78,5 +78,5 @@ Because the documentation isn't clear on how to calculate the score if Modified
78
78
 
79
79
  ## Contributing
80
80
 
81
- Bug reports and pull requests are welcome on GitHub at https://github.com/siemens/cvss_suite. This project is intended to be a safe, welcoming space for collaboration.
81
+ Bug reports and pull requests are welcome on GitHub at https://github.com/siemens/cvss-suite. This project is intended to be a safe, welcoming space for collaboration.
82
82
 
@@ -1,3 +1,13 @@
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
+
1
11
  # coding: utf-8
2
12
  lib = File.expand_path('../lib', __FILE__)
3
13
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -12,9 +22,7 @@ Gem::Specification.new do |spec|
12
22
 
13
23
  spec.summary = %q{Ruby gem for processing cvss vectors.}
14
24
  spec.description = %q{This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document).
15
- Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.
16
-
17
- Homepage is still in progress and will be published soon (along with full documentation).}
25
+ Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.}
18
26
  spec.homepage = "https://github.com/siemens/cvss-suite"
19
27
 
20
28
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require 'cvss_suite/cvss2/cvss2'
4
12
  require 'cvss_suite/cvss3/cvss3'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  ##
4
12
  # This class represents any CVSS vector. Do not instantiate this class!
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../../../lib/cvss_suite/cvss'
4
12
  require_relative 'cvss2_base'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../cvss_property'
4
12
  require_relative '../cvss_metric'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../cvss_property'
4
12
  require_relative '../cvss_metric'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../cvss_property'
4
12
  require_relative '../cvss_metric'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../../../lib/cvss_suite/cvss'
4
12
  require_relative 'cvss3_base'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../cvss_property'
4
12
  require_relative '../cvss_metric'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../cvss_property'
4
12
  require_relative '../cvss_metric'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  require_relative '../cvss_property'
4
12
  require_relative '../cvss_metric'
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  ##
4
12
  # This class represents any CVSS metric.
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  ##
4
12
  # This class represents a CVSS property of a CVSS metric.
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  ##
4
12
  # This module includes methods which are used by the CVSS 3 classes.
@@ -1,4 +1,12 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  ##
4
12
  # This class includes extensions for the Float datatype.
@@ -8,6 +16,16 @@ class Float
8
16
  ##
9
17
  # Since CVSS 3 all float values are rounded up, therefore this method is used instead of the mathematically correct method round().
10
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
+
11
29
  def round_up(decimal_paces = 0)
12
30
  (self * 10.0**decimal_paces).ceil / 10.0**decimal_paces
13
31
  end
@@ -1,5 +1,13 @@
1
- # © Siemens AG, 2016
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.
2
10
 
3
11
  module CvssSuite
4
- VERSION = "1.0.7"
12
+ VERSION = "1.0.8"
5
13
  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: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Hamboerger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,8 +83,6 @@ dependencies:
83
83
  description: |-
84
84
  This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document).
85
85
  Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.
86
-
87
- Homepage is still in progress and will be published soon (along with full documentation).
88
86
  email:
89
87
  - oliver.hamboerger@siemens.com
90
88
  executables: []
@@ -100,7 +98,6 @@ files:
100
98
  - Gemfile
101
99
  - LICENSE.md
102
100
  - README.md
103
- - Rakefile
104
101
  - bin/console
105
102
  - bin/setup
106
103
  - cvss_suite.gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec