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:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3f865bef547fbeaff014ef335c04a88cf63fd37bb6064b09973aab82042a5e42
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 690380cc8bb555950b7c9149a1fa3c314b387a3d8fe36c4bd38a36225277d59b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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
         
     | 
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 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
         
     |