<commit_before>output = `cucumber features --dry-run --expand --no-color -r features`
scenario_lines = output.split("\n").select { |line| !!line.match(/^(\s+)?Scenario:/) }
scenario_locations = scenario_lines.map { |line| line.split("#")[1].strip }

require 'sinatra'

get '/scenario' do
  scenario_locations.pop
end
<commit_msg>server can get back result<commit_after>output = `cucumber features --dry-run --expand --no-color -r features`
scenario_lines = output.split("\n").select { |line| !!line.match(/^(\s+)?Scenario:/) }
scenario_locations = scenario_lines.map { |line| line.split("#")[1].strip }
results = {}

require 'sinatra'

get '/scenario' do
  scenario_locations.pop
end

post '/result' do
  results[ params[:scenario] ] = params[:result]
end

get '/result' do
  results.inspect
end

{'fraction_non_alphanumeric': 0.17964824120603015, 'fraction_numerical': 0.002512562814070352, 'mean_word_length': 4.652482269503546, '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': '4775483', 'n_tokens_mistral': 276, 'n_tokens_neox': 271, 'n_words': 63}