avro_schema_registry-client 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31dd66f6c95e6bc63f0cb37cf0da57794f3d6c75
4
- data.tar.gz: 69135493b57ccd5987f8780388cf27402222ff2b
3
+ metadata.gz: d255f0720f3c11b231fe828a6bd731b0e605e8d9
4
+ data.tar.gz: c961d73efc7bd4994bfd1f046fe9e9294199c10c
5
5
  SHA512:
6
- metadata.gz: 9a49cb4caff0ea7ada702076cfc5f815ef0425c428f6d40289c3632212608811549399951ff3d6e350a90e902c08978b1f241b656c91f73fc3d4f0cf045576b4
7
- data.tar.gz: 386de0ce6a17c1eeec95196cf487d1e4406c9c5d19ed8e42d530d27d60659429c1922729cb3929630ab22cf2d2053d65b8a74fda14e5d79612d8fd74a1953680
6
+ metadata.gz: 67114107c1fdea6397cedc6a7005eaae753485046c27c52d62f35431cf1a6856e531e4293d9824c674a1c55c777376ab43962df68214625aa2517ac3bafa27ea
7
+ data.tar.gz: 4fe9f755ec382129d59565d70ca89876a153f4cfc6a3622e89714ebf8bc3373f51f26eec14aaeb0b73819fcf3389de922444ba3e8e16148636d7ba42f9960a28
@@ -1,4 +1,7 @@
1
1
  # avro_schema_registry-client
2
2
 
3
+ ## v0.2.0
4
+ - Add `register_without_lookup` method to `AvroSchemaRegistry::Client`.
5
+
3
6
  ## v0.1.0
4
7
  - Initial version
@@ -21,15 +21,17 @@ module AvroSchemaRegistry
21
21
  # Override register to first check if a schema is registered by fingerprint
22
22
  # Also, allow additional params to be passed to register.
23
23
  def register(subject, schema, **params)
24
-
25
24
  lookup_subject_schema(subject, schema)
26
25
  rescue Excon::Errors::NotFound
26
+ register_without_lookup(subject, schema, params)
27
+ end
28
+
29
+ def register_without_lookup(subject, schema, **params)
27
30
  data = post("/subjects/#{subject}/versions",
28
31
  body: { schema: schema.to_s }.merge!(params).to_json)
29
32
  id = data.fetch('id')
30
33
  @logger.info("Registered schema for subject `#{subject}`; id = #{id}")
31
34
  id
32
-
33
35
  end
34
36
 
35
37
  # Override to add support for additional params
@@ -1,3 +1,3 @@
1
1
  module AvroSchemaRegistry
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avro_schema_registry-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-06 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler