typelizer 0.5.0 → 0.5.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: fd7dab7ab6fabb3be94f1ca6bd6ea98337ea5b6c52811b413ed28f0804e5bd64
4
- data.tar.gz: e1dc88644daebf2c3c34ded6cee520963c009568f45cde70e60d1276b8a859c2
3
+ metadata.gz: fa25b7b1816ce597e18fd9914b7f9434a4f9cbc4e5e7dcb80c783850a0e3d99c
4
+ data.tar.gz: 882d39a7faffcec6d7911c646a5a82a5164be04943c5f109b3c245f03728bcb8
5
5
  SHA512:
6
- metadata.gz: a910d1e73e070287d5c01d3d10f7b8c181b81a78474f4cf53f45c774fea5362d1498345a16f495630e10637f4314548266c779893dccb4dad2d8b95c15cf09da
7
- data.tar.gz: 214105e604e21a4901ff437fbf26d8d19886be704c10b8981a26025bfc17fde3046fb1c9e90bf3db0f9a4abd4a954940d6c4168672e58136ff90c9961bcefc38
6
+ metadata.gz: c99a3bc8dd6bbeaeed50394963d5a7081ebf3d1d837c9fa0b3bff6e4bd822974c8953fa355b22b07539736f18f2f7cf7f998e1bb68bdb01785a18bc1a6e5e0b7
7
+ data.tar.gz: 7b041dc084316a0ce823150b32c6af5555abacf15aaa99f4a286eec87d4a7f5b7ada172dcf3b45735139574647c91e7e5fe722d5da0a1959305a4e87d093157d
data/CHANGELOG.md CHANGED
@@ -7,11 +7,17 @@ and this project adheres to [Semantic Versioning].
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.1] - 2025-09-11
11
+
12
+ ### Fixed
13
+
14
+ - Fix type inference when using virtual associations. ([@hkamberovic])
15
+
10
16
  ## [0.5.0] - 2025-09-01
11
17
 
12
18
  ### Added
13
19
 
14
- - Support for multiple output writers: emit several variants (e.g., snake_case and camelCase) in parallel. ([@supdex])
20
+ - Support for multiple output writers: emit several variants (e.g., snake_case and camelCase) in parallel. ([@prog-supdex])
15
21
  - Support for Rails' Attributes API. ([@skryukov])
16
22
 
17
23
  ## [0.4.2] - 2025-06-23
@@ -178,6 +184,7 @@ and this project adheres to [Semantic Versioning].
178
184
 
179
185
  [@davidrunger]: https://github.com/davidrunger
180
186
  [@Envek]: https://github.com/Envek
187
+ [@hkamberovic]: https://github.com/hkamberovic
181
188
  [@kristinemcbride]: https://github.com/kristinemcbride
182
189
  [@nkriege]: https://github.com/nkriege
183
190
  [@NOX73]: https://github.com/NOX73
@@ -185,10 +192,11 @@ and this project adheres to [Semantic Versioning].
185
192
  [@patvice]: https://github.com/patvice
186
193
  [@PedroAugustoRamalhoDuarte]: https://github.com/PedroAugustoRamalhoDuarte
187
194
  [@skryukov]: https://github.com/skryukov
188
- [@supdex]: https://github.com/supdex
195
+ [@prog-supdex]: https://github.com/prog-supdex
189
196
  [@ventsislaf]: https://github.com/ventsislaf
190
197
 
191
- [Unreleased]: https://github.com/skryukov/typelizer/compare/v0.5.0...HEAD
198
+ [Unreleased]: https://github.com/skryukov/typelizer/compare/v0.5.1...HEAD
199
+ [0.5.1]: https://github.com/skryukov/typelizer/compare/v0.5.0...v0.5.1
192
200
  [0.5.0]: https://github.com/skryukov/typelizer/compare/v0.4.2...v0.5.0
193
201
  [0.4.2]: https://github.com/skryukov/typelizer/compare/v0.4.1...v0.4.2
194
202
  [0.4.1]: https://github.com/skryukov/typelizer/compare/v0.4.0...v0.4.1
@@ -63,7 +63,6 @@ module Typelizer
63
63
  column = model_class&.columns_hash&.dig(prop.column_name.to_s)
64
64
  return nil unless column
65
65
 
66
- column = model_class&.columns_hash&.dig(prop.column_name.to_s)
67
66
  prop.multi = !!column.try(:array)
68
67
  case config.null_strategy
69
68
  when :nullable
@@ -88,7 +87,7 @@ module Typelizer
88
87
  def infer_types_for_attribute(prop)
89
88
  return nil unless model_class.respond_to?(:attribute_types)
90
89
 
91
- attribute_type_obj = model_class.attribute_types[prop.column_name.to_s]
90
+ attribute_type_obj = model_class.attribute_types.fetch(prop.column_name.to_s, nil)
92
91
  return nil unless attribute_type_obj
93
92
 
94
93
  if attribute_type_obj.respond_to?(:subtype)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Typelizer
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typelizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svyatoslav Kryukov