avrolution 0.5.0 → 0.6.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
- SHA1:
3
- metadata.gz: 65255866ae4d0a94d2593b5790fa4c239eadcb5f
4
- data.tar.gz: 6fe56ac49eb4b67d28b78e8d711bfafe477a7423
2
+ SHA256:
3
+ metadata.gz: c7d4b754d95d3b617fdb6530b9794c10821a160a51c82348bac6263770563b28
4
+ data.tar.gz: 5ed8aad4c8f6e1b415f87a857471f86b82737a7d7eb5c1aca8c23cdc0fd2e45d
5
5
  SHA512:
6
- metadata.gz: eb44f270a1633c23a8638a07835d1d881bfba272ba40cfaf6e4a81f2f757975b1f13f5c0d0796695770d55a8c407faf9ffefc540c7d43faac50bd515898ec59e
7
- data.tar.gz: 9721a7672a5c7f0442ee2bba766ede50bdfb32d16fc2e2257c46fdbf10ba507caac0cce52df1b5deecf283571a82d4aaa4d5e672b798459d04ad573619c0fb92
6
+ metadata.gz: ab59c24ece897cdce51741e1957ec8fc0a9aad153af6b845f7bbb671cc77d61c8dc61159d989264034f22123ba6ecaa5399d3a61349dd3276cef5c7dc5df58a6
7
+ data.tar.gz: 58fee972a11fb77ceb5f81499585e0d705a356fc972ff69cb7403f50d34f7e4ff1c0867e61632287013ad671d7c2d6cb75ecd0a0cdf5ebafe5bcc034fa81f8f7
@@ -1,5 +1,8 @@
1
1
  # avrolution
2
2
 
3
+ ## v0.6.0
4
+ - Do not check compatibility for previously registered schemas.
5
+
3
6
  ## v0.5.0
4
7
  - Require `avro-resolution_canonical_form` v0.2.0 or later to use
5
8
  `avro-patches` instead of `avro-salsify-fork`.
data/README.md CHANGED
@@ -58,7 +58,7 @@ For Rails applications, the `avro:check_compatibility` task is automatically
58
58
  defined via a Railtie.
59
59
 
60
60
  This task does not require any arguments. It checks the
61
- compatibility of all Avro JSON schemas found recursively under `Avrolution.root`
61
+ compatibility of all unregistered Avro JSON schemas found recursively under `Avrolution.root`
62
62
  against the schema registry `ENV['COMPATIBILITY_SCHEMA_REGISTRY_URL']` or
63
63
  `Avroluion.compatibility_schema_registry_url`.
64
64
 
@@ -54,6 +54,7 @@ module Avrolution
54
54
  fingerprint = schema.sha256_resolution_fingerprint.to_s(16)
55
55
 
56
56
  logger.info("Checking compatibility: #{fullname}")
57
+ return if schema_registered?(fullname, schema)
57
58
  compatible = schema_registry.compatible?(fullname, schema, 'latest')
58
59
 
59
60
  if compatible.nil?
@@ -65,6 +66,12 @@ module Avrolution
65
66
  end
66
67
  end
67
68
 
69
+ def schema_registered?(fullname, schema)
70
+ schema_registry.lookup_subject_schema(fullname, schema)
71
+ rescue Excon::Errors::NotFound
72
+ nil
73
+ end
74
+
68
75
  # For a schema that is incompatible with the latest registered schema,
69
76
  # check if there is a compatibility break defined and check compatibility
70
77
  # using the level defined by the break.
@@ -1,3 +1,3 @@
1
1
  module Avrolution
2
- VERSION = '0.5.0'.freeze
2
+ VERSION = '0.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avrolution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.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-06-01 00:00:00.000000000 Z
11
+ date: 2018-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
278
  version: '0'
279
279
  requirements: []
280
280
  rubyforge_project:
281
- rubygems_version: 2.6.12
281
+ rubygems_version: 2.7.6
282
282
  signing_key:
283
283
  specification_version: 4
284
284
  summary: Support for the evolution of Avro schemas stored in a schema registry.