<commit_before>Factory.sequence :login do |n|
  Faker::Internet.user_name + n.to_s
end

Factory.sequence :user_authentication_token do |n|
  "xxxx#{Time.now.to_i}#{rand(1000)}#{n}xxxxxxxxxxxxx"
end

Factory.define :user do |f|
  f.email { Faker::Internet.email }
  f.login { |u| u.email }
  f.authentication_token { Factory.next(:user_authentication_token) }
  f.password "<PASSWORD>"
  f.password_confirmation "<PASSWORD>"
end

Factory.define(:admin_user, :parent => :user) do |u|
  u.roles { [Role.find_by_name("admin") || Factory(:role, :name => "admin")]}
end<commit_msg>Fixed issue with the user factory for core cukes.<commit_after>Factory.sequence :login do |n|
  Faker::Internet.user_name + n.to_s
end

Factory.sequence :user_authentication_token do |n|
  "xxxx#{Time.now.to_i}#{rand(1000)}#{n}xxxxxxxxxxxxx"
end

Factory.define :user do |f|
  f.email { Faker::Internet.email }
  f.login { |u| u.email }
  f.password "<PASSWORD>"
  f.password_confirmation "<PASSWORD>"
  f.authentication_token { Factory.next(:user_authentication_token) } if User.attribute_method? :authentication_token
end

Factory.define(:admin_user, :parent => :user) do |u|
  u.roles { [Role.find_by_name("admin") || Factory(:role, :name => "admin")]}
end
{'fraction_non_alphanumeric': 0.15883306320907617, 'fraction_numerical': 0.006482982171799027, 'mean_word_length': 5.569148936170213, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4938452', 'n_tokens_mistral': 463, 'n_tokens_neox': 449, 'n_words': 90}