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 +4 -4
- data/CHANGELOG.md +3 -3
- data/README.md +17 -3
- data/lib/avromatic/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3edc684e5b6a637fa71fa717b8ea30e6503cc0a5
|
|
4
|
+
data.tar.gz: 1e32d812904379da626158fbb27b486a3a3eb465
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
4
|
-
- Add `Avromatic.on_initialize` proc that is called
|
|
5
|
-
|
|
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
|
-
|
|
173
|
-
|
|
174
|
-
|
|
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
|
|
data/lib/avromatic/version.rb
CHANGED
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
|
|
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-
|
|
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:
|
|
292
|
+
version: '0'
|
|
293
293
|
requirements: []
|
|
294
294
|
rubyforge_project:
|
|
295
295
|
rubygems_version: 2.4.8
|