avromatic 3.0.1 → 3.0.2
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 +4 -0
- data/README.md +4 -1
- data/lib/avromatic.rb +4 -0
- data/lib/avromatic/rspec.rb +1 -0
- data/lib/avromatic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e809f79141573b5b305bd08859b5bc78554ce8044c7affb7f47d6ccf3ffabe9f
|
4
|
+
data.tar.gz: 537f11353220a3dbd723f6bc5f9939a1d72e2db570085276e4f990db96284b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623cfd23c9b9700be27022c8eb31f1815f0ff78c938e3dbfd08df485f942b79d3c925225406d33b5c5f7575b7247314a9781a5ab8705dc90929dcc9d26528350
|
7
|
+
data.tar.gz: 4835ad980bf412547204c70ae261014b966b71c24f56b30f595a9d0e1ecc41d85ad1e123861466ca5951db9d7e40032a386b2454eacf07bb23d02e3103f1b166
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# avromatic changelog
|
2
2
|
|
3
|
+
## 3.0.2
|
4
|
+
- Reset the schema registry client between RSpec tests to ensure any cached values are
|
5
|
+
consistent with the fake schema registry.
|
6
|
+
|
3
7
|
## 3.0.1
|
4
8
|
- Raise an error when registering a nested model that has already been auto-generated.
|
5
9
|
This avoids hard to troubleshoot coercion errors when instantiating models and fixes
|
data/README.md
CHANGED
@@ -72,7 +72,9 @@ and the [Messaging API](#messaging-api).
|
|
72
72
|
so that they can be referenced by id. Either `schema_registry` or
|
73
73
|
`registry_url` must be configured.
|
74
74
|
* **registry_url**: URL for the schema registry. Either `schema_registry` or
|
75
|
-
`registry_url` must be configured.
|
75
|
+
`registry_url` must be configured. The `build_schema_registry!` method may
|
76
|
+
be used to create a caching schema registry client instance based on other
|
77
|
+
configuration values.
|
76
78
|
* **use_schema_fingerprint_lookup**: Avromatic supports a Schema Registry
|
77
79
|
[extension](https://github.com/salsify/avro-schema-registry#extensions) that
|
78
80
|
provides an endpoint to lookup existing schema ids by fingerprint.
|
@@ -91,6 +93,7 @@ Example using a schema registry:
|
|
91
93
|
Avromatic.configure do |config|
|
92
94
|
config.schema_store = AvroTurf::SchemaStore.new(path: 'avro/schemas')
|
93
95
|
config.registry_url = Rails.configuration.x.avro_schema_registry_url
|
96
|
+
config.build_schema_registry!
|
94
97
|
config.build_messaging!
|
95
98
|
end
|
96
99
|
```
|
data/lib/avromatic.rb
CHANGED
@@ -45,6 +45,10 @@ module Avromatic
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def self.build_schema_registry!
|
49
|
+
self.schema_registry = build_schema_registry
|
50
|
+
end
|
51
|
+
|
48
52
|
def self.build_messaging
|
49
53
|
raise 'Avromatic must be configured with a schema_store' unless schema_store
|
50
54
|
Avromatic::Messaging.new(
|
data/lib/avromatic/rspec.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salsify Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|