From 3137c4b9527b49e4f9a9a91b297ff28d7422b0d2 Mon Sep 17 00:00:00 2001 From: HArsHA Ellanki Date: Mon, 21 Oct 2024 10:45:40 -0400 Subject: [PATCH] rails 7.1 deep merge fix --- lib/resource_registry.rb | 1 + lib/resource_registry/registry.rb | 2 +- taxonomies/hash_store.rb | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/resource_registry.rb b/lib/resource_registry.rb index 80bfa70a..8ec67a91 100644 --- a/lib/resource_registry.rb +++ b/lib/resource_registry.rb @@ -22,6 +22,7 @@ require 'resource_registry/feature_dsl' require 'resource_registry/configuration' require 'resource_registry/registry' +require 'deep_merge/rails_compat' module ResourceRegistry end diff --git a/lib/resource_registry/registry.rb b/lib/resource_registry/registry.rb index 15748c74..3e284442 100644 --- a/lib/resource_registry/registry.rb +++ b/lib/resource_registry/registry.rb @@ -122,7 +122,7 @@ def nested_namespaces return @nested_namespaces if defined? @nested_namespaces @nested_namespaces = namespace_features_hash.reduce({}) do |data, (namespace, features)| - data.deep_merge(namespace_to_hash(namespace.split('.'), features)) + data.deeper_merge(namespace_to_hash(namespace.split('.'), features)) end end diff --git a/taxonomies/hash_store.rb b/taxonomies/hash_store.rb index e6c33c68..a51a65e9 100644 --- a/taxonomies/hash_store.rb +++ b/taxonomies/hash_store.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true -require 'deep_merge' +require 'deep_merge/rails_compat' + module ResourceRegistry module Stores module Operations @@ -10,7 +11,7 @@ class HashStore def call(input) if defined? ResourceRegistry::AppSettings - DeepMerge.deep_merge!( + DeepMerge.deeper_merge!( input.to_h, ResourceRegistry::AppSettings, merge_hash_arrays: true,