avromatic 0.10.0.rc1 → 0.10.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: 5dbd37633cd348a96917ae4b153141a24a74ca5c
4
- data.tar.gz: a82c963e06dfc920d1060bd641218d9ee2dca94a
3
+ metadata.gz: 3edc684e5b6a637fa71fa717b8ea30e6503cc0a5
4
+ data.tar.gz: 1e32d812904379da626158fbb27b486a3a3eb465
5
5
  SHA512:
6
- metadata.gz: 5635d6de42f046d5bcf9cdf925607fb64c6f9b7ab392cba443a5100aad07d4cf3d697b09848534ea01a7994951c7ea87e5589dc7a1729ce35c03d5f73ac3a233
7
- data.tar.gz: d8afd7e929304bc5cf781236757ee0c13bfdc74f74044888b89de456c07c44126bbc4857c662118684f4de2f73bf9567749291ba4dca831996a0a966056aab90
6
+ metadata.gz: 5c08d19c73780f6421126098c325852db05a828905ea2fb4f87c71fe4ffdf83460a373c67430ddf71a21d138f655f899d87dde3891adcc2e03d45ead4f1dde1a
7
+ data.tar.gz: bd398cea6c28603b3975c8f893d67f8362154c061ed8105c29bb2d625e71332ad51fda763f89b613ceb476ce2e8104d2c9f5331e32163187112c13c41a95abdb
data/CHANGELOG.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # avromatic changelog
2
2
 
3
- ## v0.10.0 (unreleased)
4
- - Add `Avromatic.on_initialize` proc that is called in Rails applications at the
5
- end of `.configure` and on Rails reloading.
3
+ ## v0.10.0
4
+ - Add `Avromatic.on_initialize` proc that is called at the end of `.configure`
5
+ and on code reloading in Rails applications.
6
6
 
7
7
  ## v0.9.0
8
8
  - Experimental: Add support for more than one non-null type in a union.
data/README.md CHANGED
@@ -41,6 +41,10 @@ Or install it yourself as:
41
41
  that is used to store, by full schema name, the generated models that are
42
42
  embedded within top-level models. By default a new `Avromatic::ModelRegistry`
43
43
  is created.
44
+ * **on_initialize**: An optional Proc that runs at the end of
45
+ `Avromatic.configure` and during code reloading in Rails applications. This
46
+ option is useful for defining models that will be extended when the load
47
+ order is important.
44
48
 
45
49
  #### Using a Schema Registry/Messaging API
46
50
 
@@ -169,9 +173,19 @@ it can be used as a nested model.
169
173
  To extend a model that will be used as a nested model, you must ensure that it
170
174
  is defined, which will register it, prior it being referenced by another model.
171
175
 
172
- With Rails for example, it may be necessary to reference in an initializer
173
- models that are extended and will be used as nested models so that classes load
174
- in the correct order.
176
+ Using the `Avromatic.on_initialize` option allows models that are extended and
177
+ will be used as nested models to be defined at the end of the `.configure`
178
+ block. In Rails applications, this Proc will also be executed after
179
+ `nested_models` is cleared when code reloads to ensure that classes load in the
180
+ correct order:
181
+
182
+ ```ruby
183
+ Avromatic.configure do |config|
184
+ config.on_initialize do
185
+ # reference any extended models that should be defined first
186
+ MyNestedModel
187
+ end
188
+ end
175
189
 
176
190
  #### Custom Types
177
191
 
@@ -1,3 +1,3 @@
1
1
  module Avromatic
2
- VERSION = '0.10.0.rc1'.freeze
2
+ VERSION = '0.10.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.10.0.rc1
4
+ version: 0.10.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: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avro
@@ -287,9 +287,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
287
287
  version: '0'
288
288
  required_rubygems_version: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - ">"
290
+ - - ">="
291
291
  - !ruby/object:Gem::Version
292
- version: 1.3.1
292
+ version: '0'
293
293
  requirements: []
294
294
  rubyforge_project:
295
295
  rubygems_version: 2.4.8