active_record_compose 0.11.0 → 0.11.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: eae661ba621f2e95a089f01a029aa1918af952588e2a0204a8124e1c48aeecc3
4
- data.tar.gz: '0208e91c70ea06235a2870901fcae2dfda328b8877b4ab9d776b14cd4e1de322'
3
+ metadata.gz: 7115746e66528afc3f77c4cdda3d67e726299370348da3908a5bbf28411a3d46
4
+ data.tar.gz: 9e7a2ab773f2f102678f8a3fe59663a753d2dc5868cca5ec70759fb9cf628349
5
5
  SHA512:
6
- metadata.gz: 0e535cd4c0cc88700fbb50846db582848dd13b612274328a60382963ace26fafa06feb8ad9c724e95f4f48d257c2877ce2d74f828671f33639d533a341be2c37
7
- data.tar.gz: 24ad34a3fd2b608c7f266f09417f9aeca97c494dcedd9b233a83eb5f2d6bb04e2f867acf1eb7260749886dbbbdce3f458885861277cd36dd34087ac7d7b33b8e
6
+ metadata.gz: ce69fcb813d2fdb83cb5385ac5c1d08787471f7f601f3b4a2b5a76d412550095a2a3457850442cda422834b8ba51812b68730b42fa6dcfb2192dd439112568b7
7
+ data.tar.gz: 567baeb464e8bcaf1c6cfad6acf5637a5bd5a1097da3ed9b4c54b5d2510bfa34a1e514d6e19860af28e089560a6a9a7ed5812c348509ea9b74b46bb08dbab97e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.11.1] - 2025-06-10
4
+
5
+ - fix: Because `define_attribute_methods` was not executed, `#attributes` was evaluated each time `attribute?` was called.
6
+
3
7
  ## [0.11.0] - 2025-05-30
4
8
 
5
9
  - `#attribute_names` now takes into account attributes declared in `.delegate_attribute`
@@ -54,6 +54,7 @@ module ActiveRecordCompose
54
54
  end
55
55
 
56
56
  delegate(*delegates, to:, allow_nil:)
57
+ attributes.each { define_attribute_methods _1 }
57
58
  self.delegated_attributes = delegated_attributes.to_a + attributes.map { _1.to_s }
58
59
  end
59
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordCompose
4
- VERSION = '0.11.0'
4
+ VERSION = '0.11.1'
5
5
  end
@@ -42,6 +42,8 @@ module ActiveRecordCompose
42
42
  def delegated_attributes: () -> Array[String]
43
43
 
44
44
  module ClassMethods : Module
45
+ include ActiveModel::AttributeMethods::ClassMethods
46
+
45
47
  def delegate_attribute: (*untyped methods, to: untyped, ?allow_nil: untyped?) -> untyped
46
48
  def delegated_attributes: () -> Array[String]
47
49
  def delegated_attributes=: (Array[String]) -> untyped
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_compose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hamajyotan
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-29 00:00:00.000000000 Z
10
+ date: 2025-06-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activerecord
@@ -55,7 +55,7 @@ metadata:
55
55
  homepage_uri: https://github.com/hamajyotan/active_record_compose
56
56
  source_code_uri: https://github.com/hamajyotan/active_record_compose
57
57
  changelog_uri: https://github.com/hamajyotan/active_record_compose/blob/main/CHANGELOG.md
58
- documentation_uri: https://www.rubydoc.info/gems/active_record_compose/0.11.0
58
+ documentation_uri: https://www.rubydoc.info/gems/active_record_compose/0.11.1
59
59
  rubygems_mfa_required: 'true'
60
60
  rdoc_options: []
61
61
  require_paths: