avromatic 0.25.0 → 0.26.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
  SHA1:
3
- metadata.gz: c9b90e592c9479ce33ee18c69e7015e9f6f1a555
4
- data.tar.gz: 681a4f77f781c1c005425f949f385cd51bf666d3
3
+ metadata.gz: 451fd9fa685dddd983664ea80d4837c11a817ded
4
+ data.tar.gz: 8f193cd2ccb68e0499ebee10d601f4718ac9b280
5
5
  SHA512:
6
- metadata.gz: c8b9458f552eba32b660d9e40a35ec5f7c0d528dc5a516b0ec4b18d671a299da550233afce32701cec063f1bfae16de0c4f8015aba80acc29e2269776d88b769
7
- data.tar.gz: 7d8b0347c8db2c7a59c17b34fc9ba96f8956f037db7c108dbaded473ea2fe6f66e6fa503ebd989f55c174fe202679dd58cd139787168e4773276a75d2e4c9fca
6
+ metadata.gz: c671e40b23ac5ebb2daf9c2eef85e9e04f549b73130559415c14eef0dfb74eb9684f9d5fbe0829d8c708736ae39cafa0654eafc632c91cfc4f76363b9f4bf121
7
+ data.tar.gz: 588a53eff19801d108cd487c1e77a75b1112ccfef4def3bd37a1ac1a291194e20ff9b61d12a7caf54416458c193bfdb7a912b3d1a306a15f44957217f602b583
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # avromatic changelog
2
2
 
3
+ ## v0.26.0
4
+ - Caches result of Avromatic::Model::RawSerialization#value_attributes_for_avro for immutable models
5
+
3
6
  ## v0.25.0
4
7
  - Disallow optional fields in schemas used for keys by default.
5
8
 
@@ -76,7 +76,11 @@ module Avromatic
76
76
  end
77
77
 
78
78
  def value_attributes_for_avro
79
- avro_hash(value_avro_field_names)
79
+ if self.class.config.mutable
80
+ avro_hash(value_avro_field_names)
81
+ else
82
+ @value_attributes_for_avro ||= avro_hash(value_avro_field_names)
83
+ end
80
84
  end
81
85
 
82
86
  def key_attributes_for_avro
@@ -1,3 +1,3 @@
1
1
  module Avromatic
2
- VERSION = '0.25.0'.freeze
2
+ VERSION = '0.26.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avromatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify Engineering
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2017-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro