<commit_before>module FakeRails3Generators
  # XXX: Rails 2 Compatibility
  require 'rails_generator/base'

  class Base < Rails::Generator::Base

    def self.source_root(path)
      @@source_path = path
    end

    def source_path(relative_source)
      File.join(@@source_path, relative_source)
    end

    def file_name
      @file_name
    end

    def migration_template(source, destination)
      migration_dir = File.dirname(destination)
      @file_name = File.basename(destination).sub(/\.rb$/, '')

      record do |m|
        m.migration_template(source, migration_dir)
      end
    end

    def manifest
      create_migration_file
    end
  end
end<commit_msg>only define FakeRails3Generators for rails2<commit_after>if CANVAS_RAILS2

module FakeRails3Generators
  # XXX: Rails 2 Compatibility
  require 'rails_generator/base'

  class Base < Rails::Generator::Base

    def self.source_root(path)
      @@source_path = path
    end

    def source_path(relative_source)
      File.join(@@source_path, relative_source)
    end

    def file_name
      @file_name
    end

    def migration_template(source, destination)
      migration_dir = File.dirname(destination)
      @file_name = File.basename(destination).sub(/\.rb$/, '')

      record do |m|
        m.migration_template(source, migration_dir)
      end
    end

    def manifest
      create_migration_file
    end
  end
end

end
{'fraction_non_alphanumeric': 0.08102345415778252, 'fraction_numerical': 0.004975124378109453, 'mean_word_length': 2.977401129943503, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5082961', 'n_tokens_mistral': 461, 'n_tokens_neox': 437, 'n_words': 96}