<commit_before>require 'bundler'
Bundler.require

apps = []

sprockets_env = Opal::RSpec::SprocketsEnvironment.new(spec_pattern         = 'spec/**/*_spec.{rb,opal}',
                                                      spec_exclude_pattern = nil,
                                                      spec_files           = nil,
                                                      default_path         = 'spec')

apps << Opal::Sprockets::Server.new(sprockets: sprockets_env) { |s|
  s.main = 'opal/rspec/sprockets_runner'
  s.append_path 'spec'
  s.index_path = 'index.html.erb'
  s.debug = false
}

apps << Class.new(Sinatra::Base) {
  get '/http' do
    "lol"
  end

  post '/http' do
    if params['lol'] == 'wut'
      "ok"
    else
      "fail"
    end
  end

  put '/http' do
    if params['lol'] == 'wut'
      "ok"
    else
      "fail"
    end
  end

  delete '/http' do
    "lol"
  end
<commit_msg>Add debug mode to config.ru<commit_after>require 'bundler'
Bundler.require

apps = []

sprockets_env = Opal::RSpec::SprocketsEnvironment.new(spec_pattern         = 'spec/**/*_spec.{rb,opal}',
                                                      spec_exclude_pattern = nil,
                                                      spec_files           = nil,
                                                      default_path         = 'spec')

apps << Opal::Sprockets::Server.new(sprockets: sprockets_env) { |s|
  s.main = 'opal/rspec/sprockets_runner'
  s.append_path 'spec'
  s.index_path = 'index.html.erb'
  s.debug = true
}

apps << Class.new(Sinatra::Base) {
  get '/http' do
    "lol"
  end

  post '/http' do
    if params['lol'] == 'wut'
      "ok"
    else
      "fail"
    end
  end

  put '/http' do
    if params['lol'] == 'wut'
      "ok"
    else
      "fail"
    end
  end

  delete '/http' do
    "lol"
  end

{'fraction_non_alphanumeric': 0.12697547683923704, 'fraction_numerical': 0.0, 'mean_word_length': 1.4611260053619304, 'pattern_counts': {'":': 0, '<': 11, '<?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': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3647314', 'n_tokens_mistral': 621, 'n_tokens_neox': 608, 'n_words': 122}