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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89ce66083a51c7811468f9435288afbc53f81418f21635af4393eaf1ac635d14
4
- data.tar.gz: 7344d77ba35c156a6a18abe6f5ff498b7a8cd24b460c5b3f6bf1f0739bd0c8aa
3
+ metadata.gz: e90abb8ddc9adbf7cdedd0b534cf3e769c05e186ad263c112a17878790c39816
4
+ data.tar.gz: aa619e40729249353356776866dcd72007490dc02319b1aa8613038c0f8439bc
5
5
  SHA512:
6
- metadata.gz: 33e534a676d589ba88db064b8ba57bbd10a20d268c417d8ed89fbc9b830f2861e4d3c1b46772d9151fce5dcff909e591f26f4fe1be77c247da4e1ceb4998d1cc
7
- data.tar.gz: 401030ee3033228b11d2b75fa411809e7707b0c8b6791c2fe9da8bf9ce290c290225cb4e23895bc31019cc8cead19ac20335fffb24682c58ebc7f09a8250999a
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
@@ -1,3 +1,3 @@
1
1
  module Alba
2
- VERSION = '2.4.0'.freeze
2
+ VERSION = '2.4.1'.freeze
3
3
  end
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
- const_parent.const_get("#{inflector.classify(name)}Resource")
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alba
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OKURA Masafumi