Sha256: f75d88dcf128e013ef33bd960533efd18a1866e75060ebdda930751b4c26d8b5

Contents?: true

Size: 658 Bytes

Versions: 4

Compression:

Stored size: 658 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

4 entries across 4 versions & 1 rubygems

Version Path
avrolution-0.9.0 lib/avrolution/rake/check_compatibility_task.rb
avrolution-0.8.0 lib/avrolution/rake/check_compatibility_task.rb
avrolution-0.7.2 lib/avrolution/rake/check_compatibility_task.rb
avrolution-0.7.1 lib/avrolution/rake/check_compatibility_task.rb