vrt 0.5.0 → 0.5.1

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: 334fbfda473980d30290ab34b1067869cb0cbdf8
4
- data.tar.gz: cc3a8b77958779d1e255f3ec03ea7b53cf94610e
3
+ metadata.gz: 642f88ca4984745ddceb7817ee6e71939f52c216
4
+ data.tar.gz: 1d58a3e55b2153dd8e1b71fec4007fc1204c0fb5
5
5
  SHA512:
6
- metadata.gz: a82a35420049b037116610124dc087e23c2944972c5c88733cc0dbe7cf80dc7576d53aa537e3368c08335d62f3efc3250778d756fe6c148be35b3bfeccc47b6a
7
- data.tar.gz: 1829f1c86bd2ad635a22183b2e3ed0360780e437c0ceb14379e5c71b80d514b99152aec0d5d51b0de2eb47a03e28506eb0816eddbad567fd160f74ff6a3394a7
6
+ metadata.gz: 3208e0f62cd08885342f8d48381522d0bc75d7379bfabbc90ba165a8d89864008bb36b46a120520dafae78353fccc561bf63bde2fe87339eceb20a5a95c9b5d6
7
+ data.tar.gz: 4af600357cd9d8f717e3fcf9e08fc57e735539ce06e58faae63fcd30de9bc09252b8f55ca44d4bdb9b1212b3b3abc5bda68248b3b5f27a40b78fc5c79eaef4ed
@@ -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
- default: default&.try(:[], key)
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, default: default)
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:, default:)
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 = default
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
@@ -1,3 +1,3 @@
1
1
  module Vrt
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.5.1'.freeze
3
3
  end
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.0
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-01 00:00:00.000000000 Z
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.5.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