<commit_before>WebMock.disable_net_connect!

Hostess.local = true

TEST_DIR = File.join('/', 'tmp', 'gemcutter')

DatabaseCleaner.clean_with :truncation
DatabaseCleaner.strategy = :transaction

Before do
  WebMock.reset_webmock
  DatabaseCleaner.start

  FileUtils.mkdir(TEST_DIR)
  Dir.chdir(TEST_DIR)

  $fog.directories.create(:key => $rubygems_config[:s3_bucket], :public => true)
end

After do
  DatabaseCleaner.clean

  FileUtils.rm_rf(TEST_DIR)
  $redis.flushdb
end<commit_msg>WebMock.reset_webmock is deprecated<commit_after>WebMock.disable_net_connect!

Hostess.local = true

TEST_DIR = File.join('/', 'tmp', 'gemcutter')

DatabaseCleaner.clean_with :truncation
DatabaseCleaner.strategy = :transaction

Before do
  WebMock.reset!
  DatabaseCleaner.start

  FileUtils.mkdir(TEST_DIR)
  Dir.chdir(TEST_DIR)

  $fog.directories.create(:key => $rubygems_config[:s3_bucket], :public => true)
end

After do
  DatabaseCleaner.clean

  FileUtils.rm_rf(TEST_DIR)
  $redis.flushdb
end
{'fraction_non_alphanumeric': 0.11393692777212615, 'fraction_numerical': 0.002034587995930824, 'mean_word_length': 5.739726027397261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7460632', 'n_tokens_mistral': 366, 'n_tokens_neox': 356, 'n_words': 57}