<commit_before>class FactoryGenerator < Rails::Generator::NamedBase
  def manifest
    record do |m|
      m.directory File.join('test/factories', class_path)
     	m.template 'factory.rb',  File.join('test/factories', class_path, "#{file_name}_factory.rb")
    end
  end

  def factory_line(attribute)
    unless attribute.name == 'name'
      "#{file_name}.#{attribute.name} '#{attribute.default}'"
    else
      "#{file_name}.add_attribute '#{attribute.name}', '#{attribute.default}'"
    end
  end

  protected
    def banner
      "Usage: #{$0} #{spec.name} FactoryName [field:type, field:type]"
    end
end<commit_msg>No longer use add_attribute, since you can use 'name' freely.<commit_after>class FactoryGenerator < Rails::Generator::NamedBase
  def manifest
    record do |m|
      m.directory File.join('test/factories', class_path)
     	m.template 'factory.rb',  File.join('test/factories', class_path, "#{file_name}_factory.rb")
    end
  end

  def factory_line(attribute)
    "#{file_name}.#{attribute.name} '#{attribute.default}'"
  end

  protected
    def banner
      "Usage: #{$0} #{spec.name} FactoryName [field:type, field:type]"
    end
end
{'fraction_non_alphanumeric': 0.14604810996563575, 'fraction_numerical': 0.001718213058419244, 'mean_word_length': 3.8949579831932772, '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': '244376', 'n_tokens_mistral': 379, 'n_tokens_neox': 374, 'n_words': 84}