forest_admin_datasource_toolkit 1.0.0.pre.beta.30 → 1.0.0.pre.beta.32

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: dbf68462a3fe8b364fc9845b89cca238b2a4e37c9163fd06515e07bc3818bc0d
4
- data.tar.gz: 503e91b6e461279e3b59773f99291d643e45bfc0d07d796d80f052b4b4524a18
3
+ metadata.gz: 3f865bef547fbeaff014ef335c04a88cf63fd37bb6064b09973aab82042a5e42
4
+ data.tar.gz: 690380cc8bb555950b7c9149a1fa3c314b387a3d8fe36c4bd38a36225277d59b
5
5
  SHA512:
6
- metadata.gz: 54800b688fd66df2f15b2a32ba2517e122088b9be7bd34d7f22b59b8bf8dc036b82a0cad854726e808e7887fe0887ecd7628b9aa404bc957c6451fd13bc9c9bc
7
- data.tar.gz: 1e2808e809dc1b78c8ef524f488dcd33ce0ae0d1342a67ab296329adabcea13aeb9ebebfd06e6d92dd31d90f40e43dbb7b8b86c73ec4ec87b05b6e3545c1f036
6
+ metadata.gz: b91235272e0de2880cb403a47d73c048a687e10262614d9093743a5cf10788d79ea83538e883246aaa4dcb9d16e9cf675f3ffbc778239a97803dcd68c6a8a77e
7
+ data.tar.gz: 1e9cbe19df7596855bae67fc3415c7b2c8698367ab5b66f8c81c4756edbefb3a23151dca38754244dd54c8d370b637f27151a46b058912fe93246d60dee2c13e
@@ -0,0 +1,19 @@
1
+ module ForestAdminDatasourceToolkit
2
+ module Utils
3
+ class HashHelper
4
+ def self.convert_keys(object, method = :to_sym)
5
+ if object.is_a? Array
6
+ object.each_with_object([]) do |value, new_array|
7
+ new_array << convert_keys(value, method)
8
+ end
9
+ elsif object.is_a? Hash
10
+ object.each_with_object({}) do |(key, value), new_hash|
11
+ new_hash[key.send(method)] = value.is_a?(Hash) ? convert_keys(value, method) : value
12
+ end
13
+ else
14
+ object
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module ForestAdminDatasourceToolkit
2
- VERSION = "1.0.0-beta.30"
2
+ VERSION = "1.0.0-beta.32"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_datasource_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.30
4
+ version: 1.0.0.pre.beta.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-02-13 00:00:00.000000000 Z
12
+ date: 2024-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -97,6 +97,7 @@ files:
97
97
  - lib/forest_admin_datasource_toolkit/schema/relations/one_to_many_schema.rb
98
98
  - lib/forest_admin_datasource_toolkit/schema/relations/one_to_one_schema.rb
99
99
  - lib/forest_admin_datasource_toolkit/utils/collection.rb
100
+ - lib/forest_admin_datasource_toolkit/utils/hash_helper.rb
100
101
  - lib/forest_admin_datasource_toolkit/utils/record.rb
101
102
  - lib/forest_admin_datasource_toolkit/utils/schema.rb
102
103
  - lib/forest_admin_datasource_toolkit/validations/chart_validator.rb