compliance_engine 0.1.1 → 0.1.2

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: b5a48cfc74834d72605b0c735def9499da907d799e30a78e5253b6b3712366a1
4
- data.tar.gz: 258e32544f1a90950a963658f37b5604109933de15a17bb5cea5bd8f6bfae7a5
3
+ metadata.gz: fee65bb4492e02e3223e589aa7b567e8b64e1b8140183ad4f8eecab01998ad85
4
+ data.tar.gz: c259b00c35ffbe1f4bfa0e6878a471ae31ecaeea7ac688222e66aaa9a496a14c
5
5
  SHA512:
6
- metadata.gz: 493847f9d6a0f679c16cbac55526db9f730da23fedade51f1a395392d2f649dc1ccd0f1ca1b4aa73e7592b65a63b86e0427edabe851bf91695a2c871333d7003
7
- data.tar.gz: ee0ee28c7a1dc3a7305b1136f3ff972c491c98d0076d7d859c48c40b3c5a261c44e8546576dc413acb0405b37310e387293920c85570261c348972fdf7e6eb13
6
+ metadata.gz: 97c8b3ea7970037515a1af146301b088b7c3c042f6b5e8f0c1c2388287eaa06429fbf5d6bfc5cbaa5a27e214ca904bc2bb9dd647e2d89b08a6d3aa8e52c3f8be
7
+ data.tar.gz: 87d12eb35f45db3a6e56e69d5038c33f29fd10e6f2a32014dc0d6d44c9c8299aa1c0300599fb527c4189910533b57cf16cc61b58ae2b11cec82d7f0763ad3c29
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 0.1.2 / 2024-12-04
2
+ * Fix environment loading (#35)
3
+
1
4
  ### 0.1.1 / 2024-12-03
2
5
  * Update README.md and other documentation
3
6
  * Add a `version` CLI command
@@ -355,7 +355,7 @@ class ComplianceEngine::Data
355
355
  #
356
356
  # @return [Array<Symbol>]
357
357
  def context_variables
358
- [:@enforcement_tolerance, :@environment_data, :@facts]
358
+ [:@enforcement_tolerance, :@environment_data, :@facts, :@modulepath]
359
359
  end
360
360
 
361
361
  # Get the cache variables
@@ -18,7 +18,7 @@ class ComplianceEngine::EnvironmentLoader::Zip < ComplianceEngine::EnvironmentLo
18
18
  dir = zipfile.dir
19
19
  file = zipfile.file
20
20
 
21
- super(path, root: root, fileclass: file, dirclass: dir)
21
+ super(root, fileclass: file, dirclass: dir)
22
22
  end
23
23
  end
24
24
  end
@@ -8,18 +8,16 @@ class ComplianceEngine::EnvironmentLoader
8
8
  # Initialize an EnvironmentLoader from the components of a Puppet `modulepath`
9
9
  #
10
10
  # @param paths [Array] the paths to search for Puppet modules
11
- # @param root [String] the root directory to search for Puppet modules
12
11
  # @param fileclass [File] the class to use for file operations (default: `File`)
13
12
  # @param dirclass [Dir] the class to use for directory operations (default: `Dir`)
14
- def initialize(*paths, root: nil, fileclass: File, dirclass: Dir)
13
+ def initialize(*paths, fileclass: File, dirclass: Dir)
15
14
  raise ArgumentError, 'No paths specified' if paths.empty?
16
15
  @modulepath ||= paths
17
16
  modules = paths.map do |path|
18
- root ||= path
19
- dirclass.entries(root)
17
+ dirclass.entries(path)
20
18
  .grep(%r{\A[a-z][a-z0-9_]*\Z})
21
- .select { |child| fileclass.directory?(File.join(root, child)) }
22
- .map { |child| File.join(root, child) }
19
+ .select { |child| fileclass.directory?(File.join(path, child)) }
20
+ .map { |child| File.join(path, child) }
23
21
  rescue
24
22
  []
25
23
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ComplianceEngine
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
 
6
6
  # Handle supported compliance data versions
7
7
  class Version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compliance_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Pritchard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-03 00:00:00.000000000 Z
11
+ date: 2024-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -120,7 +120,7 @@ licenses:
120
120
  metadata:
121
121
  homepage_uri: https://simp-project.com/docs/sce/
122
122
  source_code_uri: https://github.com/simp/rubygem-simp-compliance_engine
123
- changelog_uri: https://github.com/simp/rubygem-simp-compliance_engine/releases/tag/0.1.1
123
+ changelog_uri: https://github.com/simp/rubygem-simp-compliance_engine/releases/tag/0.1.2
124
124
  bug_tracker_uri: https://github.com/simp/rubygem-simp-compliance_engine/issues
125
125
  post_install_message:
126
126
  rdoc_options: []