Sha256: b828190e6979dcdd02c5935f1f05dfd22f9986578516b8d4e5d78c90d7fe53df

Contents?: true

Size: 552 Bytes

Versions: 7

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

require "json"

module DeprecationToolkit
  module Behaviors
    class CIRecordHelper
      extend ReadWriteHelper

      HEADER = "[DeprecationToolkit]"

      def self.trigger(test, current_deprecations, _recorded_deprecations)
        filename = recorded_deprecations_path(test)

        to_output = {
          filename.to_s => {
            test_name(test) => current_deprecations.deprecations_without_stacktrace,
          },
        }

        raise "#{HEADER} #{JSON.dump(to_output)}"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
deprecation_toolkit-2.2.0 lib/deprecation_toolkit/behaviors/ci_record_helper.rb
deprecation_toolkit-2.1.0 lib/deprecation_toolkit/behaviors/ci_record_helper.rb
deprecation_toolkit-2.0.4 lib/deprecation_toolkit/behaviors/ci_record_helper.rb
deprecation_toolkit-2.0.3 lib/deprecation_toolkit/behaviors/ci_record_helper.rb
deprecation_toolkit-2.0.2 lib/deprecation_toolkit/behaviors/ci_record_helper.rb
deprecation_toolkit-2.0.1 lib/deprecation_toolkit/behaviors/ci_record_helper.rb
deprecation_toolkit-2.0.0 lib/deprecation_toolkit/behaviors/ci_record_helper.rb