active_typed_store 2.1.0 → 2.2.0

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: 284ddabdbf758d07bc56e984971ef1cf058633a663e9a6f50072f3d795fe76cf
4
- data.tar.gz: 52cb762351e5e2132d1f3f7c16b034449474f63cb0641ddc6d7c67cb5b9778fa
3
+ metadata.gz: 1e918d13d52a6a9f552268e94d638b32654d63dc9ab20d299b163c6ad84ff548
4
+ data.tar.gz: 0bf50c0a8b76af41801b7ada33a7b8748a33b99a9ec0095a3a4b6c513cd9e1a1
5
5
  SHA512:
6
- metadata.gz: 0ff0bf66c6037e2124e2bf5513070b6dc5035afb3770457db1e729b755486828ae9cb447ce62828f94707480a08e18d164437d5961b0a0589c94e353e3396082
7
- data.tar.gz: 59b389d92a4582c6824444e874c6c20279461d467e7454e6a59ad8c5e3f705c15069f0c5d1613d593ea283614d26d261ba20c971634c81169f0840e2a0e8896d
6
+ metadata.gz: c99c23d0ac8876b192a71ef57e07fc5668123d1af4865048ce575b657a1761bf54958220bee6ec3c8ecae5ad102c16f605c32fcf9c11294b7c94aea18fc83c54
7
+ data.tar.gz: 76b28e162bf1c42c9b9eb47aa338c3708e27e54123461577fe50570925ad6a1c8b46db66f71b6800378056cba5d3dfef976e33ba24d7052edfcaa5b6dd912012
data/Gemfile.lock CHANGED
@@ -22,7 +22,7 @@ GIT
22
22
  PATH
23
23
  remote: .
24
24
  specs:
25
- active_typed_store (2.1.0)
25
+ active_typed_store (2.2.0)
26
26
  activemodel
27
27
  activerecord
28
28
  activesupport
@@ -8,16 +8,13 @@ module ActiveTypedStore
8
8
  end
9
9
  end
10
10
 
11
+ CUSTOM_JSON = CustomJson.new
12
+
11
13
  def typed_store(store_attribute, &)
12
14
  attrs = Attrs.new(store_attribute)
13
15
  attrs.instance_eval(&)
14
16
 
15
- # for redefined self._default_attributes
16
- def self.type_for_column(connection, column) # rubocop:disable Lint/NestedMethodDefinition
17
- return ActiveTypedStore::Store::CustomJson.new if column.name == "params"
18
-
19
- super
20
- end
17
+ define_attribute(store_attribute.name, CUSTOM_JSON)
21
18
  store_accessor store_attribute, attrs.fields
22
19
 
23
20
  if ActiveTypedStore.config.hash_safety == :disallow_symbol_keys
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveTypedStore
4
- VERSION = "2.1.0"
4
+ VERSION = "2.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_typed_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ermolaev Andrey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-05-28 00:00:00.000000000 Z
11
+ date: 2025-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel