<commit_before># -*- coding: utf-8 -*-
FactoryGirl.define do
  factory :role do
    sequence(:name) { |n| "Role-#{n}" }
    homepage_url 'http://rspec.info/'
    category Role::CATEGORIES.keys.first
  end

  factory :user do
    sequence(:username) { |n| "user-#{n}" }
    first_name 'First'
    last_name 'Last'
    roles 1.upto(2).map {|n| FactoryGirl.create(:role, category: Role::CATEGORIES.keys[n % Role::CATEGORIES.size]) }
    sequence(:email) { |n| "<EMAIL>" }
    sequence(:displayname) { |n| "First-#{n} Last-#{n}" }
    last_login Time.now
  end

  factory :user_with_status_message, parent: :user do
    status_message 'It’s work, all that matters is work'
    status_message_updated_at Time.now
  end

  factory :add_collagues, parent: :user do
  end

  factory :feed do
    feed_url "http://www.whitehouse.gov/feed/press"
    category Feed::CATEGORIES.keys.first
  end

  factory :shortcut do
    name "Fox barx"<commit_msg>Wrapped factory call in block<commit_after># -*- coding: utf-8 -*-
FactoryGirl.define do
  factory :role do
    sequence(:name) { |n| "Role-#{n}" }
    homepage_url 'http://rspec.info/'
    category Role::CATEGORIES.keys.first
  end

  factory :user do
    sequence(:username) { |n| "user-#{n}" }
    first_name 'First'
    last_name 'Last'
    roles { 1.upto(2).map {|n| FactoryGirl.create(:role, category: Role::CATEGORIES.keys[n % Role::CATEGORIES.size]) } }
    sequence(:email) { |n| "<EMAIL>" }
    sequence(:displayname) { |n| "First-#{n} Last-#{n}" }
    last_login Time.now
  end

  factory :user_with_status_message, parent: :user do
    status_message 'It’s work, all that matters is work'
    status_message_updated_at Time.now
  end

  factory :add_collagues, parent: :user do
  end

  factory :feed do
    feed_url "http://www.whitehouse.gov/feed/press"
    category Feed::CATEGORIES.keys.first
  end

  factory :shortcut do
    name "Fox barx"
{'fraction_non_alphanumeric': 0.14662447257383968, 'fraction_numerical': 0.0031645569620253164, 'mean_word_length': 3.4846335697399526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '719765', 'n_tokens_mistral': 696, 'n_tokens_neox': 685, 'n_words': 161}