<commit_before>require "active_record/fixtures"

namespace :dummy do
  namespace :data do
    desc "Load the generated dummy data into the current environment's database."
    task :import => :environment do
      Fixtures.reset_cache
      fixtures_folder = File.join(Rails.root, "<%= options.output_folder %>/data")
      fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
      Fixtures.create_fixtures(fixtures_folder, fixtures)
    end
  end
end
<commit_msg>use ActiveRecord::Fixtures instead of Fixtures (Rails 3.1 support)<commit_after>require "active_record"
require "active_record/fixtures"

namespace :dummy do
  namespace :data do
    desc "Load the generated dummy data into the current environment's database."
    task :import => :environment do
      ActiveRecord::Fixtures.reset_cache
      fixtures_folder = File.join(Rails.root, "<%= options.output_folder %>/data")
      fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') }
      ActiveRecord::Fixtures.create_fixtures(fixtures_folder, fixtures)
    end
  end
end

{'fraction_non_alphanumeric': 0.1167420814479638, 'fraction_numerical': 0.0018099547511312218, 'mean_word_length': 4.342995169082125, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3304536', 'n_tokens_mistral': 346, 'n_tokens_neox': 333, 'n_words': 87}