<commit_before>##
## Factories that have to do with setting up accounts.
##

##
## Emails and Logins will be derived from the login sequence
##

Factory.sequence(:login) do |n| 
  "login_#{n}"
end

##
## Factory for user
##
Factory.define :user do |f|
  f.login    { Factory.next(:login) }
  f.first_name  'joe'
  f.last_name  'user' 
  f.email  { |u| <EMAIL>"}
  f.password  'password' 
  f.password_confirmation  {|u| <PASSWORD>}
  f.roles  { [ Factory.next :member_role] }
end


##
## Singleton Factory Pattern for Admin user.
##
Factory.sequence :admin_user do |n| 
  admin = User.find_by_login('admin') 
  unless admin<commit_msg>add missing parentheses ... so warnings don't appear<commit_after>##
## Factories that have to do with setting up accounts.
##

##
## Emails and Logins will be derived from the login sequence
##

Factory.sequence(:login) do |n| 
  "login_#{n}"
end

##
## Factory for user
##
Factory.define :user do |f|
  f.login    { Factory.next(:login) }
  f.first_name  'joe'
  f.last_name  'user' 
  f.email  { |u| <EMAIL>"}
  f.password  'password' 
  f.password_confirmation  {|u| <PASSWORD>}
  f.roles  { [ Factory.next(:member_role)] }
end


##
## Singleton Factory Pattern for Admin user.
##
Factory.sequence :admin_user do |n| 
  admin = User.find_by_login('admin') 
  unless admin
{'fraction_non_alphanumeric': 0.1450381679389313, 'fraction_numerical': 0.0, 'mean_word_length': 3.682142857142857, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4288719', 'n_tokens_mistral': 484, 'n_tokens_neox': 466, 'n_words': 132}