cem_spec_helper 0.2.0 → 0.4.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:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2d447a21c0b49a6ecc4ece1b5a76e64f6d424260de6403697dbc3b51ae09d33d
         | 
| 4 | 
            +
              data.tar.gz: 3e1652e6aad5019b71ef25174242d5028d4a7e6340ab248a3471c31299811275
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 72fcf808fbb85a825fae3889134d633d91e0af8e28d15ab18d7c15e9dd5eaa7e785c8b999e7989ba05fd89c30efecb50b8347cbe97e8ea94df7aabd24b3e547c
         | 
| 7 | 
            +
              data.tar.gz: ce767f5ca2ce2fa463d8c971b8bc9f8cf28cdb43b7251ce41f6491d43230bb614248a052fd7c798f6393b20daa2135684b415b1b30b04b5e2274065a85755301
         | 
| @@ -7,7 +7,7 @@ module CemSpecHelper | |
| 7 7 | 
             
                # The root directory for mapping data fixtures
         | 
| 8 8 | 
             
                MAP_ROOT = File.join(Dir.pwd, 'spec', 'fixtures', 'data', 'mapping').freeze
         | 
| 9 9 | 
             
                # The root directory for synthetic mapping data
         | 
| 10 | 
            -
                SYNTHETIC_MAP_ROOT = File.join(Dir.pwd, 'spec', 'fixtures', 'unit', 'puppet_x', 'puppetlabs', ' | 
| 10 | 
            +
                SYNTHETIC_MAP_ROOT = File.join(Dir.pwd, 'spec', 'fixtures', 'unit', 'puppet_x', 'puppetlabs', 'sce', 'data_processor', 'mapping').freeze
         | 
| 11 11 | 
             
                # The key prefix for the mappings
         | 
| 12 12 | 
             
                MAPPINGS_KEY = "#{CemSpecHelper::MODULE_NAME}::mappings"
         | 
| 13 13 | 
             
                # The top key types for each framework.
         | 
| @@ -29,9 +29,9 @@ module CemSpecHelper | |
| 29 29 | 
             
                # The major versions of Windows resource data fixtures
         | 
| 30 30 | 
             
                WINDOWS_MAJVER = [10, 2016, 2019, 2022].freeze
         | 
| 31 31 | 
             
                # The root directory for synthetic resource data fixtures
         | 
| 32 | 
            -
                SYNTHETIC_DATA_ROOT = File.join(Dir.pwd, 'spec', 'fixtures', 'unit', 'puppet_x', 'puppetlabs', ' | 
| 32 | 
            +
                SYNTHETIC_DATA_ROOT = File.join(Dir.pwd, 'spec', 'fixtures', 'unit', 'puppet_x', 'puppetlabs', 'sce', 'data_processor')
         | 
| 33 33 | 
             
                # The special controls that are not mapped to a framework
         | 
| 34 | 
            -
                SPECIAL_CONTROLS = [' | 
| 34 | 
            +
                SPECIAL_CONTROLS = ['sce_options', 'sce_protected'].freeze
         | 
| 35 35 | 
             
                # The key prefix for the resources
         | 
| 36 36 | 
             
                RESOURCES_KEY = "#{CemSpecHelper::MODULE_NAME}::resources"
         | 
| 37 37 |  | 
| @@ -237,7 +237,7 @@ module CemSpecHelper | |
| 237 237 | 
             
                  end
         | 
| 238 238 |  | 
| 239 239 | 
             
                  # @return [Array<String>] An array of control names implemented by the resource
         | 
| 240 | 
            -
                  # @param include_special [Boolean] Whether or not to include special controls ( | 
| 240 | 
            +
                  # @param include_special [Boolean] Whether or not to include special controls (sce_options, sce_protected)
         | 
| 241 241 | 
             
                  def controls(include_special: true)
         | 
| 242 242 | 
             
                    ctrls = @no_params ? @control_data : @control_data.keys
         | 
| 243 243 | 
             
                    return ctrls if include_special
         | 
    
        data/lib/cem_spec_helper.rb
    CHANGED
    
    | @@ -1,9 +1,11 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 |  | 
| 3 | 
            +
            require 'json'
         | 
| 4 | 
            +
             | 
| 3 5 | 
             
            # This module is meant to be included in the spec_helper.rb file.
         | 
| 4 6 | 
             
            # It is not meant to be used directly.
         | 
| 5 7 | 
             
            module CemSpecHelper
         | 
| 6 | 
            -
              MODULE_NAME = File. | 
| 8 | 
            +
              MODULE_NAME = JSON.parse(File.read('metadata.json'))['name'].split('puppetlabs-').last
         | 
| 7 9 |  | 
| 8 10 | 
             
              # Makes it so the CemSpecHelper module has to be included in the spec_helper.rb file.
         | 
| 9 11 | 
             
              def self.included(base)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cem_spec_helper
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.4.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - abide-team
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2024-04-02 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: Provides helper methods, classes, modules, etc. for RSpec testing the
         | 
| 14 14 | 
             
              CEM modules
         | 
| @@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 50 50 | 
             
                - !ruby/object:Gem::Version
         | 
| 51 51 | 
             
                  version: '0'
         | 
| 52 52 | 
             
            requirements: []
         | 
| 53 | 
            -
            rubygems_version: 3.4. | 
| 53 | 
            +
            rubygems_version: 3.4.22
         | 
| 54 54 | 
             
            signing_key:
         | 
| 55 55 | 
             
            specification_version: 4
         | 
| 56 56 | 
             
            summary: Spec helper for testing the CEM modules
         |