<commit_before>Given(/^I get a network timeout$/) do
  URICatcher::execute {raise RestClient::RequestTimeout}
end

When(/^I visit one of the following uris:$/) do |uris|
  uris.hashes.each do |row|
    URICatcher::when_visiting(row[:regexp] == 'true' ? %r{#{row[:uri]}} : row[:uri])
  end
end

Given(/^I do:$/) do |code|
  begin
    eval code
  rescue RestClient::RequestTimeout => @error
  rescue
    raise<commit_msg>catch any error<commit_after>Given(/^I get a network timeout$/) do
  URICatcher::execute {raise RestClient::RequestTimeout}
end

When(/^I visit one of the following uris:$/) do |uris|
  uris.hashes.each do |row|
    URICatcher::when_visiting(row[:regexp] == 'true' ? %r{#{row[:uri]}} : row[:uri])
  end
end

Given(/^I do:$/) do |code|
  begin
    eval code
  rescue => @error
{'fraction_non_alphanumeric': 0.16624685138539042, 'fraction_numerical': 0.0, 'mean_word_length': 4.371621621621622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1556506', 'n_tokens_mistral': 300, 'n_tokens_neox': 292, 'n_words': 78}