alba 2.4.0 → 2.4.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/alba/version.rb +1 -1
- data/lib/alba.rb +5 -1
- metadata +1 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e90abb8ddc9adbf7cdedd0b534cf3e769c05e186ad263c112a17878790c39816
         | 
| 4 | 
            +
              data.tar.gz: aa619e40729249353356776866dcd72007490dc02319b1aa8613038c0f8439bc
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ffeca32af2fb742376ec3a73bdc5056c8f75e3203c56da9b70c2e451ff7320b5fb7918338c11103d94392079a4d7df4bb63c65e04d66d612ff9864d2696713ff
         | 
| 7 | 
            +
              data.tar.gz: 6e6d944da2bccc6942e699c34dac9d19a21bcfed99f7da9bb5300416ce241f0ad273e1790c06fa3346617459f688783546171708397e613c4b6558fbccf21a8e
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |
| 6 6 |  | 
| 7 7 | 
             
            ## [Unreleased]
         | 
| 8 8 |  | 
| 9 | 
            +
            ## [2.4.1] 2023-08-02
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            #### Fixed
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            - Fix the bug of resource name inference for classes whose name end with "Serializer" [No PR](https://github.com/okuramasafumi/alba/commit/1695af4351981725231fd071aaef5b2e4174fb26)
         | 
| 14 | 
            +
             | 
| 9 15 | 
             
            ## [2.4.0] 2023-08-02
         | 
| 10 16 |  | 
| 11 17 | 
             
            ### Added
         | 
    
        data/lib/alba/version.rb
    CHANGED
    
    
    
        data/lib/alba.rb
    CHANGED
    
    | @@ -114,7 +114,11 @@ module Alba | |
| 114 114 | 
             
                  raise Alba::Error, 'Inference is disabled so Alba cannot infer resource name. Set inflector before use.' unless Alba.inflector
         | 
| 115 115 |  | 
| 116 116 | 
             
                  const_parent = nesting.nil? ? Object : Object.const_get(nesting)
         | 
| 117 | 
            -
                   | 
| 117 | 
            +
                  begin
         | 
| 118 | 
            +
                    const_parent.const_get("#{inflector.classify(name)}Resource")
         | 
| 119 | 
            +
                  rescue # Retry for serializer
         | 
| 120 | 
            +
                    const_parent.const_get("#{inflector.classify(name)}Serializer")
         | 
| 121 | 
            +
                  end
         | 
| 118 122 | 
             
                end
         | 
| 119 123 |  | 
| 120 124 | 
             
                # Configure Alba to symbolize keys
         |