lib/avrolution/compatibility_check.rb in avrolution-0.1.0 vs lib/avrolution/compatibility_check.rb in avrolution-0.2.0

- old
+ new

@@ -1,8 +1,9 @@ +require 'avro-resolution_canonical_form' require 'private_attr' require 'diffy' -require 'avromatic/schema_registry_patch' +require 'avro_schema_registry-client' module Avrolution class CompatibilityCheck extend PrivateAttr @@ -75,12 +76,12 @@ end def report_incompatibility(json, schema, fullname, fingerprint) last_json = schema_registry.subject_version(fullname)['schema'] last_schema = Avro::Schema.parse(last_json) - backward = last_schema.read?(schema) - forward = schema.read?(last_schema) + backward = schema.read?(last_schema) + forward = last_schema.read?(schema) compatibility_with_last = if backward && forward FULL elsif backward BACKWARD elsif forward @@ -99,10 +100,10 @@ " rake avro:add_compatibility_break name=#{fullname} fingerprint=#{fingerprint} with_compatibility=#{compatibility_with_last} [after_compatibility=<LEVEL>]\n" ) end def build_schema_registry - AvroTurf::ConfluentSchemaRegistry.new(Avrolution.compatibility_schema_registry_url, - logger: Avrolution.logger) + AvroSchemaRegistry::Client.new(Avrolution.compatibility_schema_registry_url, + logger: Avrolution.logger) end end end