vrt 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vrt/mapping.rb +5 -6
- data/lib/vrt/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 642f88ca4984745ddceb7817ee6e71939f52c216
|
4
|
+
data.tar.gz: 1d58a3e55b2153dd8e1b71fec4007fc1204c0fb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3208e0f62cd08885342f8d48381522d0bc75d7379bfabbc90ba165a8d89864008bb36b46a120520dafae78353fccc561bf63bde2fe87339eceb20a5a95c9b5d6
|
7
|
+
data.tar.gz: 4af600357cd9d8f717e3fcf9e08fc57e735539ce06e58faae63fcd30de9bc09252b8f55ca44d4bdb9b1212b3b3abc5bda68248b3b5f27a40b78fc5c79eaef4ed
|
data/lib/vrt/mapping.rb
CHANGED
@@ -26,12 +26,11 @@ module VRT
|
|
26
26
|
acc[key.to_sym] = get_key(
|
27
27
|
id_list: id_list,
|
28
28
|
mapping: mapping,
|
29
|
-
key: key
|
30
|
-
|
31
|
-
)
|
29
|
+
key: key
|
30
|
+
) || default&.try(:[], key)
|
32
31
|
end
|
33
32
|
else
|
34
|
-
get_key(id_list: id_list, mapping: mapping, key: @scheme
|
33
|
+
get_key(id_list: id_list, mapping: mapping, key: @scheme) || default
|
35
34
|
end
|
36
35
|
end
|
37
36
|
|
@@ -65,10 +64,10 @@ module VRT
|
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
68
|
-
def get_key(id_list:, mapping:, key
|
67
|
+
def get_key(id_list:, mapping:, key:)
|
69
68
|
# iterate through the id components, keeping track of where we are in the mapping file
|
70
69
|
# and the most specific mapped value found so far
|
71
|
-
best_guess =
|
70
|
+
best_guess = nil
|
72
71
|
id_list.each do |id|
|
73
72
|
entry = mapping[id]
|
74
73
|
break unless entry # mapping file doesn't go this deep, return previous value
|
data/lib/vrt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vrt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Barnett Klane
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-05-
|
13
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.6.12
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Ruby wrapper for Bugcrowd's Vulnerability Rating Taxonomy
|