abide-data-processor 0.2.1 → 0.3.0

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
  SHA256:
3
- metadata.gz: 6ac1b297c18c221a7ed68588b5f19e9cd5dc5b62b97a745d6041acabbb3867ff
4
- data.tar.gz: 340fc29d78ef0014e94ccdf1a32b7edadc8b2e9653aa1b69a313d785444236cd
3
+ metadata.gz: b04940d641ff075df44bad1d44db0c5cfb4498c0aacd69c79baf5af9234d5533
4
+ data.tar.gz: 4ccc87ba94466281cb4ed8656b3734f07063ada8c113abc2c50e6c9b61d5bed7
5
5
  SHA512:
6
- metadata.gz: 718c8e4a751a56e17fd1f170ab41da6e677aa91b5c6cec1e0745ec415bcb25b5d55215b5175107d0503ea819758a23e73b34afbd31a01a96417fe114a44a178b
7
- data.tar.gz: cd9898b06b1e4296e4e7b4ec4405852639dac5aa2365ec0ecb2fb0d28559078dc7f3ca1365af11af42c7424913ccc70faf6d7b0953d7530fc06e3282152787df
6
+ metadata.gz: 2cc5c8a4f39c318f635b84e2413435b0e5e39ce2dfa6c9acee8e1d912b7f4936dbfb131281f571c1de44b7a41d37b6f3650e45eb0ebdd3e6eec75245bad1aac0
7
+ data.tar.gz: dc18ff5f2a6c0bb41d5213969643d71261df6b36d9e31af10bd4e1d40bd532633b8bc988e33142af693983cdc1f0deda7f363096fb9e2e5b154f1f2bcaca20d8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- abide-data-processor (0.2.1)
4
+ abide-data-processor (0.3.0)
5
5
  puppet (>= 6.23)
6
6
 
7
7
  GEM
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'deep_merge'
4
4
  require 'set'
5
- require 'pry'
6
5
 
7
6
  module AbideDataProcessor
8
7
  module Processor
@@ -38,7 +37,8 @@ module AbideDataProcessor
38
37
  # @param control_configs: the custom control configurations pulled from cis.pp
39
38
  # Return a hash to be convert to Puppet code.
40
39
  def create_resources(resources_hash, only, ignore, control_configs)
41
- resources = real_resources(resources_hash, only.to_set, ignore.to_set, control_configs)
40
+ unfreezed_resources = Marshal.load(Marshal.dump(resources_hash))
41
+ resources = real_resources(unfreezed_resources, only.to_set, ignore.to_set, control_configs)
42
42
  ordered_resources = order_resources(resources)
43
43
 
44
44
  mutate_ordering_params!(ordered_resources[1])
@@ -100,7 +100,7 @@ module AbideDataProcessor
100
100
  # Below is just a sure fire way to make sure that we will never use the resource
101
101
  only.delete(name) # Remove from the only list
102
102
  ignore.add(name) # Add the name of the current control to the ignore list if we're not gonna enforce it
103
- @logger.inform("Control #{name} will not be enforced because the controls that it depends on is invalid.")
103
+ @logger.debug("Control #{name} will not be enforced because the controls that it depends on is invalid.")
104
104
  next
105
105
  end
106
106
  end
@@ -182,12 +182,12 @@ module AbideDataProcessor
182
182
  # else return true
183
183
  def only_and_ignore_check(name, name_map, only, ignore)
184
184
  if !only.empty? && !filter_function(name, name_map, only)
185
- @logger.inform("Control #{name} will be skipped because it is not in the only list.")
185
+ @logger.debug("Control #{name} will be skipped because it is not in the only list.")
186
186
  return false
187
187
  end
188
188
 
189
189
  if !ignore.empty? && filter_function(name, name_map, ignore)
190
- @logger.inform("Control #{name} will be skipped because it is in the ignore list.")
190
+ @logger.debug("Control #{name} will be skipped because it is in the ignore list.")
191
191
  return false
192
192
  end
193
193
  true
@@ -1,3 +1,3 @@
1
1
  module AbideDataProcessor
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -1,4 +1,6 @@
1
1
  require 'abide-data-processor/version'
2
2
  require 'abide-data-processor/processor'
3
+ require 'abide-data-processor/logger'
4
+
3
5
  # Root namespace for all modules / classes
4
6
  module AbideDataProcessor; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abide-data-processor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - abide-team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-19 00:00:00.000000000 Z
11
+ date: 2021-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet