<commit_before># Make sure we set that before everything
ENV['RACK_ENV'] ||= ENV['RAILS_ENV'] || ENV['ENV']
ENV['RAILS_ENV']  = ENV['RACK_ENV']

require 'travis'
require 'backports'
require 'rack'
require 'rack/protection'
require 'active_record'
require 'redis'

# Rack class implementing the HTTP API.
# Instances respond to #call.
#
#     run Travis::Api::App.new
#
# Requires TLS in production.
class Travis::Api::App
  autoload :AccessToken,  'travis/api/app/access_token'
  autoload :Responder,    'travis/api/app/responder'
  autoload :Endpoint,     'travis/api/app/endpoint'
  autoload :Extensions,   'travis/api/app/extensions'
  autoload :Helpers,      'travis/api/app/helpers'
  autoload :Middleware,   'travis/api/app/middleware'

  Rack.autoload :SSL, 'rack/ssl'

  # Used to track if setup already ran.
  def self.setup?
    @setup ||= false
  end

  # Loads all endpoints and middleware and hooks them up properly.
  # Calls #setup on any middleware and endpoint.
  #
  # This method is not threadsafe, but called when loading
  # the environment, so no biggy.
  def self.setup(options = {})
    return if setup?
    Travis::Database.connect
<commit_msg>for some reason gh is not loaded in production<commit_after># Make sure we set that before everything
ENV['RACK_ENV'] ||= ENV['RAILS_ENV'] || ENV['ENV']
ENV['RAILS_ENV']  = ENV['RACK_ENV']

require 'travis'
require 'backports'
require 'rack'
require 'rack/protection'
require 'active_record'
require 'redis'
require 'gh'

# Rack class implementing the HTTP API.
# Instances respond to #call.
#
#     run Travis::Api::App.new
#
# Requires TLS in production.
class Travis::Api::App
  autoload :AccessToken,  'travis/api/app/access_token'
  autoload :Responder,    'travis/api/app/responder'
  autoload :Endpoint,     'travis/api/app/endpoint'
  autoload :Extensions,   'travis/api/app/extensions'
  autoload :Helpers,      'travis/api/app/helpers'
  autoload :Middleware,   'travis/api/app/middleware'

  Rack.autoload :SSL, 'rack/ssl'

  # Used to track if setup already ran.
  def self.setup?
    @setup ||= false
  end

  # Loads all endpoints and middleware and hooks them up properly.
  # Calls #setup on any middleware and endpoint.
  #
  # This method is not threadsafe, but called when loading
  # the environment, so no biggy.
  def self.setup(options = {})
    return if setup?
    Travis::Database.connect

{'fraction_non_alphanumeric': 0.1174496644295302, 'fraction_numerical': 0.0, 'mean_word_length': 3.979123173277662, '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': '473700', 'n_tokens_mistral': 829, 'n_tokens_neox': 815, 'n_words': 236}