<commit_before>Before do
  GitHubMockBackend::API.init
end

After do |scenario|

  if scenario.is_a?(Cucumber::Ast::OutlineTable::ExampleRow)
    title = "#{scenario.scenario_outline.feature.title}: #{scenario.scenario_outline.name} #{scenario.name}"
  elsif scenario.is_a?(Cucumber::Ast::Scenario)
    title = "#{scenario.feature.title}: #{scenario.title}"
  else
    title = ""
  end

  puts title

  GitHubMockBackend::API.set_response body: nil, status: nil, type: nil
  requests = GitHubMockBackend::API.get_requests

  if !requests.nil? && requests.size > 0

    puts "Requests to mocked backend (#{requests.size}):"

    requests.each do |request|
      puts "\t >>> #{request['fullpath']}"
    end
  else
    puts "No requests made to the mock backend"
  end

  GitHubMockBackend::API.init
  app_close
end

at_exit do
  GitHubMockBackend::Boot.exit
  CustomWorld.exit
end<commit_msg>Fixed console output issue in scenario after hook<commit_after>Before do
  GitHubMockBackend::API.init
end

After do |scenario|
  if scenario.is_a?(Cucumber::Ast::OutlineTable::ExampleRow)
    title = "#{scenario.scenario_outline.feature.title}: #{scenario.scenario_outline.name} #{scenario.name}"
  elsif scenario.is_a?(Cucumber::Ast::Scenario)
    title = "#{scenario.feature.title}: #{scenario.title}"
  else
    title = ""
  end
  $stdout.puts "\n\t#{title}"

  GitHubMockBackend::API.set_response body: nil, status: nil, type: nil
  requests = GitHubMockBackend::API.get_requests
  if !requests.nil? && requests.size > 0
    $stdout.puts "\t#{requests.size} requests made to the mocked backend"

    requests.each_with_index do |request, index|
      $stdout.puts "\t\t##{index+1} #{request.fullpath}"
    end
  else
    $stdout.puts "\tNo requests made to the mocked backend"
  end

  GitHubMockBackend::API.init
  app_close
end

at_exit do
  GitHubMockBackend::Boot.exit
  CustomWorld.exit
end
{'fraction_non_alphanumeric': 0.1285034373347435, 'fraction_numerical': 0.0015864621893178213, 'mean_word_length': 4.344632768361582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '3362935', 'n_tokens_mistral': 649, 'n_tokens_neox': 651, 'n_words': 143}