controls 1.5.0 → 1.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/controls/ext/dish/plate.rb +5 -1
- data/lib/controls/objects/guidance.rb +6 -1
- data/lib/controls/response.rb +1 -1
- data/lib/controls/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afef162bcbc4d24e5943361cb4e5b55c4fbe2b06
|
4
|
+
data.tar.gz: ab9875952d506d826d3464593790a30368ca179a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd01f6176f85cca3499c7d226d2eed978e26e620a4625ceb700e9f95f4b00858142669065206adbc644946a9712d254cb079b7bb0f458c5fd3aa6e921602308
|
7
|
+
data.tar.gz: 1ac3ddf95b414e5a3bb3007c149650ae204fde284d08666601711a743c6d5ddb84223bd9c60a5a63aae27450359304217b6aea6cb8cc6c6a509ca97038fc1b17
|
@@ -13,7 +13,7 @@ module Dish
|
|
13
13
|
_set_value(key, args.first)
|
14
14
|
else
|
15
15
|
value = _get_value(camel_case_key)
|
16
|
-
if value.nil?
|
16
|
+
if value.nil? && !_allowed_keys.include?(camel_case_key)
|
17
17
|
super(method.to_sym, *args, &block)
|
18
18
|
else
|
19
19
|
value
|
@@ -51,5 +51,9 @@ module Dish
|
|
51
51
|
value = _convert_value(value, self.class.coercions[key])
|
52
52
|
@_original_hash[key] = value
|
53
53
|
end
|
54
|
+
|
55
|
+
def _allowed_keys
|
56
|
+
[]
|
57
|
+
end
|
54
58
|
end
|
55
59
|
end
|
@@ -1,7 +1,12 @@
|
|
1
1
|
module Controls
|
2
2
|
Guidance = Class.new(Dish::Plate)
|
3
|
-
Guidance::Reference = Class.new(Dish::Plate)
|
4
3
|
Guidance::Section = Class.new(Dish::Plate)
|
4
|
+
Guidance::Reference = Class.new(Dish::Plate) do
|
5
|
+
private
|
6
|
+
def _allowed_keys
|
7
|
+
%w[url]
|
8
|
+
end
|
9
|
+
end
|
5
10
|
|
6
11
|
class Guidance
|
7
12
|
coerce :assessmentTimestamp, ->(value) { Time.at(value / 1000) if value }
|
data/lib/controls/response.rb
CHANGED
@@ -16,7 +16,7 @@ module Controls
|
|
16
16
|
Controls::SecurityControlCoverage
|
17
17
|
when /(configuration|event|guidance|prioritized_guidance|security_control|threat_vector|trend)s?$/
|
18
18
|
Controls.const_get(Regexp.last_match[1].split('_').map(&:capitalize).join)
|
19
|
-
when %r(^(?:/\d.\d)?\/(assessment|configuration|security_control|threat|threat_vector)s)
|
19
|
+
when %r(^(?:/\d.\d)?\/(assessment|configuration|guidance|security_control|threat|threat_vector)s?)
|
20
20
|
Controls.const_get(Regexp.last_match[1].split('_').map(&:capitalize).join)
|
21
21
|
when /((?:applicable|miconfigured|uncovered|undefended)?_?asset)s$/
|
22
22
|
Controls.const_get('AssetCollection')
|
data/lib/controls/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: controls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erran Carey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dish
|