Module: DeprecationToolkit::Behaviors::CIRecordHelper

Extended by:
CIRecordHelper, ReadWriteHelper
Included in:
CIRecordHelper
Defined in:
lib/deprecation_toolkit/behaviors/ci_record_helper.rb

Constant Summary collapse

HEADER =
"[DeprecationToolkit]"

Instance Method Summary collapse

Methods included from ReadWriteHelper

read, write

Instance Method Details

#trigger(test, current_deprecations, _recorded_deprecations) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/deprecation_toolkit/behaviors/ci_record_helper.rb', line 13

def 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