jsonapi_compliable 0.11.5 → 0.11.6
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 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b7d9f768e68387c9ad4d1631a0e9ca9fb962a944
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 3d04f2113cb2a752ed7e5d9ff20e12aa883a7e68
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 21be2e3895bdc99f2d9be9dafa6683b5a0b17a0cd5b443b0e249633fe58737d87c2b16789cad33757048d1b5401d650296d91f185758192c74c67705ef69b919
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2c8bf62f1b65ebca3e1ac64faebc917acc5f66d3f7ade5cebad9a79e3fa5181e9530e321cd176ffcb5b903558c9bb0f572eee526293815b39cc808f9ffe0f1f1
         
     | 
| 
         @@ -12,15 +12,22 @@ module JsonapiCompliable 
     | 
|
| 
       12 
12 
     | 
    
         
             
                      h[k] = [*names, "Serializable#{klass}"].join('::').safe_constantize
         
     | 
| 
       13 
13 
     | 
    
         
             
                    end
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
      
 15 
     | 
    
         
            +
                    fields = query_hash[:fields].dup
         
     | 
| 
      
 16 
     | 
    
         
            +
                    extra_fields = query_hash[:extra_fields]
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                    if extra_fields.any? && fields.any?
         
     | 
| 
      
 19 
     | 
    
         
            +
                      extra_fields.each { |k,v| fields[k] = fields[k].to_a + v }
         
     | 
| 
      
 20 
     | 
    
         
            +
                    end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       15 
22 
     | 
    
         
             
                    options            = {}
         
     | 
| 
       16 
23 
     | 
    
         
             
                    options[:class]    = inferrer
         
     | 
| 
       17 
24 
     | 
    
         
             
                    options[:include]  = query_hash[:include]
         
     | 
| 
       18 
25 
     | 
    
         
             
                    options[:jsonapi]  = resolved
         
     | 
| 
       19 
     | 
    
         
            -
                    options[:fields]   =  
     | 
| 
      
 26 
     | 
    
         
            +
                    options[:fields]   = fields
         
     | 
| 
       20 
27 
     | 
    
         
             
                    options.merge!(overrides)
         
     | 
| 
       21 
28 
     | 
    
         
             
                    options[:meta]   ||= {}
         
     | 
| 
       22 
29 
     | 
    
         
             
                    options[:expose] ||= {}
         
     | 
| 
       23 
     | 
    
         
            -
                    options[:expose][:extra_fields] =  
     | 
| 
      
 30 
     | 
    
         
            +
                    options[:expose][:extra_fields] = extra_fields
         
     | 
| 
       24 
31 
     | 
    
         | 
| 
       25 
32 
     | 
    
         
             
                    if object.respond_to?(:resolve_stats)
         
     | 
| 
       26 
33 
     | 
    
         
             
                      stats = object.resolve_stats
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: jsonapi_compliable
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.11. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.11.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Lee Richmond
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2018-05- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2018-05-04 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: jsonapi-serializable
         
     |