controls 1.7.11.1 → 1.7.12
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b66ecb061e1313f9b6c49fc38fcb041e9fcc1e29
|
|
4
|
+
data.tar.gz: 810a8be7375e944ae906a301f6278f2ad71b9ca1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7bce2c581e16922c5990b8a8d22c3415657ab6c4ff4c75064678d47c2fac59d346e570fe471dd30f16aafcfdb7feb9d765af1147740f381c1e98bf4e7e5330b4
|
|
7
|
+
data.tar.gz: f2046de7cdf879c4af331c5b97ba826f752c569b1434fd05e9ee3500f63c07f4c553b76835977f572b56985249f75fb87ee05e1f6b0818c57509bf4f52f35d8a
|
|
@@ -10,8 +10,8 @@ module Controls
|
|
|
10
10
|
|
|
11
11
|
# Acts as a proxy to resources.map
|
|
12
12
|
#
|
|
13
|
-
# @
|
|
14
|
-
def map(&block)
|
|
13
|
+
# @return [Array] The results of AssetCollection#resources#map
|
|
14
|
+
def map(*args, &block)
|
|
15
15
|
resources.map(*args, &block)
|
|
16
16
|
end
|
|
17
17
|
|
|
@@ -8,6 +8,11 @@ module Controls
|
|
|
8
8
|
coerce :assessmentTimestamp, ->(value) { Time.at(value / 1000) if value }
|
|
9
9
|
coerce :coverage, Controls::CoverageInformation
|
|
10
10
|
|
|
11
|
+
# Allows for comparison with other objects with coverage information
|
|
12
|
+
#
|
|
13
|
+
# @return [Fixnum] returns one of the following based on the percent of
|
|
14
|
+
# assets that are covered -1 (less than `other`), 0 (equal to `other`),
|
|
15
|
+
# or 1 (greater than `other`)
|
|
11
16
|
def <=>(other)
|
|
12
17
|
return unless other.respond_to? :coverage
|
|
13
18
|
coverage.percent_covered <=> other.coverage.percent_covered
|
|
@@ -22,13 +27,21 @@ module Controls
|
|
|
22
27
|
end
|
|
23
28
|
end
|
|
24
29
|
|
|
30
|
+
# Converts the object into a {Controls::Configuration} by name and
|
|
31
|
+
# whether it is enabled/disabled
|
|
32
|
+
#
|
|
33
|
+
# @return {Controls::Configuration}
|
|
25
34
|
def without_coverage
|
|
26
35
|
Controls::Configuration.new(enabled: enabled, name: name)
|
|
27
36
|
end
|
|
28
37
|
|
|
38
|
+
# Removes the coverage from the {ConfigurationCoverage} object, making it
|
|
39
|
+
# equivalent to a {Configuration} in terms of duck-typing
|
|
40
|
+
#
|
|
41
|
+
# @return {Controls::Configuration}
|
|
29
42
|
def without_coverage!
|
|
30
43
|
@_original_hash.delete_if do |key, _value|
|
|
31
|
-
|
|
44
|
+
!%w(enabled name).include?(key)
|
|
32
45
|
end
|
|
33
46
|
end
|
|
34
47
|
|
|
@@ -4,6 +4,13 @@ module Controls
|
|
|
4
4
|
class Guidance
|
|
5
5
|
# A object that represents the reference resource of a {Controls::Guidance}
|
|
6
6
|
class Reference < Dish::Plate
|
|
7
|
+
# Represents the guidance collection in a human friendly way
|
|
8
|
+
#
|
|
9
|
+
# @return [String] a string representing a guidance collection
|
|
10
|
+
def to_s
|
|
11
|
+
url ? "#{title}: (#{url})" : title
|
|
12
|
+
end
|
|
13
|
+
|
|
7
14
|
private
|
|
8
15
|
|
|
9
16
|
# Ensures that calling url wouldn't raise a KeyError when {nil}
|
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.7.
|
|
4
|
+
version: 1.7.12
|
|
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-06-
|
|
11
|
+
date: 2014-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dish
|