<commit_before>module Exceptioner::Transport
  module Helper
    extend self

    def format_env(env)
      unless env.empty?
        max_length = env.keys.max_by { |key| key.to_s.size }.size
        env.keys.sort.collect do |key|
          "* #{"%-*s: %s" % [max_length, key, env[key].to_s.strip[0..50]]}\n\t"
        end
      end
    end

    def title(text)
      length = text.size + 5
      char = '#'
      "#{char * length}\n#{text}:\n#{char * length}\n"
    end



  end
end<commit_msg>fixed environment variables formatting<commit_after>module Exceptioner::Transport
  module Helper
    extend self

    def format_env(env)
      unless env.empty?
        max_length = env.keys.max_by { |key| key.to_s.size }.size
        env.keys.sort.collect do |key|
          "* #{"%-*s: %s" % [max_length, key, env[key].to_s.strip[0..50]]}"
        end
      end.join("\n\t")
    end

    def title(text)
      length = text.size + 5
      char = '#'
      "#{char * length}\n#{text}:\n#{char * length}\n"
    end



  end
end
{'fraction_non_alphanumeric': 0.1572265625, 'fraction_numerical': 0.0078125, 'mean_word_length': 2.1538461538461537, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3934403', 'n_tokens_mistral': 378, 'n_tokens_neox': 368, 'n_words': 78}