<commit_before>require "bundler/setup"
ENV["RACK_ENV"] ||= "development"
Bundler.require(:default, ENV["RACK_ENV"].to_sym)
Dotenv.load

require "./hook_delivery"

configure do
  MongoMapper.setup({'production' => {'uri' => ENV['MONGOHQ_URL']}}, 'production')
end

post "/" do
  puts request.inspect
  headers = {
    "X-GitHub-Event"    => request.env["X-Github-Event"],
    "X-GitHub-Delivery" => request.env["X-Github-Delivery"],
    "X-Hub-Signature"   => request.env["X-Hub-Signature"]<commit_msg>Use env instead of request<commit_after>require "bundler/setup"
ENV["RACK_ENV"] ||= "development"
Bundler.require(:default, ENV["RACK_ENV"].to_sym)
Dotenv.load

require "./hook_delivery"

configure do
  MongoMapper.setup({'production' => {'uri' => ENV['MONGOHQ_URL']}}, 'production')
end

post "/" do
  headers = {
    "X-GitHub-Event"    => env["X-GitHub-Event"],
    "X-GitHub-Delivery" => env["X-GitHub-Delivery"],
    "X-Hub-Signature"   => env["X-Hub-Signature"]
{'fraction_non_alphanumeric': 0.20041322314049587, 'fraction_numerical': 0.0, 'mean_word_length': 4.802395209580839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '3890378', 'n_tokens_mistral': 372, 'n_tokens_neox': 362, 'n_words': 55}