<commit_before>class Sliver::Rails::Action
  include Sliver::Action

  BODIED_METHODS = %w( post put patch )

  def self.expose(name, options = {}, &block)
    add_exposed_methods name, options, &block if block_given?

    locals << name
  end

  def self.add_exposed_methods(name, options = {}, &block)<commit_msg>Add controller-like logging of action and params.<commit_after>class Sliver::Rails::Action
  include Sliver::Action

  BODIED_METHODS = %w( post put patch )

  def self.call(environment)
    request = ::Rack::Request.new environment
    Rails.logger.info "Processing by #{name}"
    if request.params.any?
      Rails.logger.info "  Parameters: #{request.params.inspect}"
    end

    super
  end

  def self.expose(name, options = {}, &block)
    add_exposed_methods name, options, &block if block_given?

    locals << name
  end

  def self.add_exposed_methods(name, options = {}, &block)
{'fraction_non_alphanumeric': 0.11589403973509933, 'fraction_numerical': 0.0, 'mean_word_length': 3.9562841530054644, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '2820566', 'n_tokens_mistral': 300, 'n_tokens_neox': 282, 'n_words': 74}