Sha256: 7f17b2c6ba5dfb7bfb17e2c91a5883ce72d2b932276b9111aafb9bd13a8d313d

Contents?: true

Size: 657 Bytes

Versions: 1

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true

require 'avrolution/rake/base_task'

module Avrolution
  module Rake
    class CheckCompatibilityTask < BaseTask

      def initialize(*)
        super
        @name ||= :check_compatibility
        @task_desc ||= 'Check that all Avro schemas are compatible with latest registered in production'
      end

      private

      def perform
        check = Avrolution::CompatibilityCheck.new.call
        if check.success?
          puts 'All schemas are compatible!'
        else
          puts "\nIncompatible schemas found: #{check.incompatible_schemas.join(', ')}"
          exit(1)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
avrolution-0.7.0 lib/avrolution/rake/check_compatibility_task.rb