Skip to content

Commit

Permalink
Explicitly call DeepMerge.deep_merge! instead of the Hash method
Browse files Browse the repository at this point in the history
Fixes #26
  • Loading branch information
silug committed Dec 27, 2024
1 parent 1f1134e commit 5c3a3cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/compliance_engine/component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def element
@element = {}

fragments.each_value do |fragment|
@element = @element.deep_merge!(fragment)
@element = DeepMerge.deep_merge!(fragment, @element)
end

@element
Expand Down
4 changes: 2 additions & 2 deletions lib/compliance_engine/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def confines
collection.each_value do |v|
v.to_a.each do |component|
next unless component.key?('confine')
@confines = @confines.deep_merge!(component['confine'])
@confines = DeepMerge.deep_merge!(component['confine'], @confines)
end
end
end
Expand Down Expand Up @@ -310,7 +310,7 @@ def hiera(requested_profiles = [])

valid_profiles.reverse_each do |profile|
check_mapping(profile).each_value do |check|
parameters = parameters.deep_merge!(check.hiera)
parameters = DeepMerge.deep_merge!(check.hiera, parameters)
end
end

Expand Down

0 comments on commit 5c3a3cd

Please sign in to comment.