<commit_before>require "spec_helper"

describe Lita::RackApp do
  let(:handler_class) do
    Class.new(Lita::Handler) do
      http.get "web", :web
      http.post "path/with/:id", :variable
      http.link "foo", :foo
      http.get "heres/*a/glob/in/a/path", :glob
      http.get ":var/otherwise/identical/path", :constraint, var: /\d+/
      http.get ":var/otherwise/identical/path", :no_constraint

      def web(_request, response)
        response.write("it worked")<commit_msg>Test HTTP routes with just the HTTPRouter mixin.<commit_after>require "spec_helper"

describe Lita::RackApp do
  let(:handler_class) do
    Class.new do
      extend Lita::Handler::HTTPRouter

      http.get "web", :web
      http.post "path/with/:id", :variable
      http.link "foo", :foo
      http.get "heres/*a/glob/in/a/path", :glob
      http.get ":var/otherwise/identical/path", :constraint, var: /\d+/
      http.get ":var/otherwise/identical/path", :no_constraint

      def web(_request, response)
        response.write("it worked")
{'fraction_non_alphanumeric': 0.14883268482490272, 'fraction_numerical': 0.0, 'mean_word_length': 3.149193548387097, 'pattern_counts': {'":': 4, '<': 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': '5186637', 'n_tokens_mistral': 351, 'n_tokens_neox': 337, 'n_words': 76}