<commit_before>require 'shout_out/version'
require 'active_support/concern'

module ShoutOut
  extend ActiveSupport::Concern

  included do
    after_initialize -> { shout(:after_initialize, self) }
    after_find -> shout(:after_find, self) }
    after_touch -> shout(:after_touch, self) }
    before_validation -> { shout(:before_validation, self) }
    validate -> { shout(:validate, self) }
    after_validation -> { shout(:after_validation, self) }
    before_save -> { shout(:before_save, self) }
    around_save -> { shout(:around_save, self) }
    after_save -> { shout(:after_save, self) }
    before_create -> { shout(:before_create, self) }
    around_create -> { shout(:around_create, self) }
    after_create -> { shout(:after_create, self) }
    before_update -> { shout(:before_update, self) }
    around_update -> { shout(:around_update, self) }
    after_update -> { shout(:after_update, self) }
    before_destroy -> { shout(:before_destroy, self) }
    around_destroy -> { shout(:around_destroy, self) }
    after_destroy -> { shout(:after_destroy, self) }
    after_commit -> { shout(:after_commit, self) }
  end

  def shout(action, record)
    begin
      klass = "#{record.class.model_name}Shout".constantize<commit_msg>added missing curly brackets<commit_after>require 'shout_out/version'
require 'active_support/concern'

module ShoutOut
  extend ActiveSupport::Concern

  included do
    after_initialize -> { shout(:after_initialize, self) }
    after_find -> { shout(:after_find, self) }
    after_touch -> { shout(:after_touch, self) }
    before_validation -> { shout(:before_validation, self) }
    validate -> { shout(:validate, self) }
    after_validation -> { shout(:after_validation, self) }
    before_save -> { shout(:before_save, self) }
    around_save -> { shout(:around_save, self) }
    after_save -> { shout(:after_save, self) }
    before_create -> { shout(:before_create, self) }
    around_create -> { shout(:around_create, self) }
    after_create -> { shout(:after_create, self) }
    before_update -> { shout(:before_update, self) }
    around_update -> { shout(:around_update, self) }
    after_update -> { shout(:after_update, self) }
    before_destroy -> { shout(:before_destroy, self) }
    around_destroy -> { shout(:around_destroy, self) }
    after_destroy -> { shout(:after_destroy, self) }
    after_commit -> { shout(:after_commit, self) }
  end

  def shout(action, record)
    begin
      klass = "#{record.class.model_name}Shout".constantize
{'fraction_non_alphanumeric': 0.13892215568862276, 'fraction_numerical': 0.0, 'mean_word_length': 3.952569169960474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2921783', 'n_tokens_mistral': 769, 'n_tokens_neox': 761, 'n_words': 150}