<commit_before>class SetEntity
  def initialize(app)
    @app = app
  end

  def call(env)
    env['tent.entity'] = (env['HTTP_X_FORWARDED_PROTO'] || env['rack.url_scheme']) + '://' + env['HTTP_HOST']
    @app.call(env)
  end
end
<commit_msg>Use TENT_ENTITY environment variable. Addresses tent/tentd#29.<commit_after>class SetEntity
  def initialize(app)
    @app = app
  end

  def call(env)
    env['tent.entity'] = ENV['TENT_ENTITY'] || ((env['HTTP_X_FORWARDED_PROTO'] || env['rack.url_scheme']) + '://' + env['HTTP_HOST'])
    @app.call(env)
  end
end

{'fraction_non_alphanumeric': 0.17594254937163376, 'fraction_numerical': 0.003590664272890485, 'mean_word_length': 4.214953271028038, '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': '4634877', 'n_tokens_mistral': 217, 'n_tokens_neox': 211, 'n_words': 38}